diff --git a/src/attr.rs b/src/attr.rs index 1c02d748..dd4b9493 100644 --- a/src/attr.rs +++ b/src/attr.rs @@ -75,7 +75,10 @@ impl Parse for Attr { impl Attr { pub(crate) fn span(&self) -> Span { - self.key.span().join(self.value.span()).unwrap_or(self.key.span()) + self.key + .span() + .join(self.value.span()) + .unwrap_or_else(|| self.key.span()) } }