From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- vendor/clap_derive/src/utils/spanned.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'vendor/clap_derive/src/utils/spanned.rs') diff --git a/vendor/clap_derive/src/utils/spanned.rs b/vendor/clap_derive/src/utils/spanned.rs index 11415f6f0..339a654e6 100644 --- a/vendor/clap_derive/src/utils/spanned.rs +++ b/vendor/clap_derive/src/utils/spanned.rs @@ -5,7 +5,7 @@ use syn::LitStr; use std::ops::{Deref, DerefMut}; /// An entity with a span attached. -#[derive(Debug, Clone)] +#[derive(Debug, Copy, Clone)] pub struct Sp { val: T, span: Span, @@ -16,11 +16,8 @@ impl Sp { Sp { val, span } } - pub fn call_site(val: T) -> Self { - Sp { - val, - span: Span::call_site(), - } + pub fn get(&self) -> &T { + &self.val } pub fn span(&self) -> Span { -- cgit v1.2.3