summaryrefslogtreecommitdiffstats
path: root/vendor/clap_derive/src/utils/spanned.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/clap_derive/src/utils/spanned.rs')
-rw-r--r--vendor/clap_derive/src/utils/spanned.rs9
1 files changed, 3 insertions, 6 deletions
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<T> {
val: T,
span: Span,
@@ -16,11 +16,8 @@ impl<T> Sp<T> {
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 {