refactor(derive): Make Sp copyable

This commit is contained in:
Ed Page 2022-09-02 10:23:05 -05:00
parent ebe181acc7
commit c56277c084
2 changed files with 3 additions and 3 deletions

View file

@ -949,11 +949,11 @@ impl Item {
} }
pub fn casing(&self) -> Sp<CasingStyle> { pub fn casing(&self) -> Sp<CasingStyle> {
self.casing.clone() self.casing
} }
pub fn env_casing(&self) -> Sp<CasingStyle> { pub fn env_casing(&self) -> Sp<CasingStyle> {
self.env_casing.clone() self.env_casing
} }
pub fn has_explicit_methods(&self) -> bool { pub fn has_explicit_methods(&self) -> bool {

View file

@ -5,7 +5,7 @@ use syn::LitStr;
use std::ops::{Deref, DerefMut}; use std::ops::{Deref, DerefMut};
/// An entity with a span attached. /// An entity with a span attached.
#[derive(Debug, Clone)] #[derive(Debug, Copy, Clone)]
pub struct Sp<T> { pub struct Sp<T> {
val: T, val: T,
span: Span, span: Span,