Access single span via the Deref impl
diff --git a/src/ident.rs b/src/ident.rs
index adc545f..f5a76a1 100644
--- a/src/ident.rs
+++ b/src/ident.rs
@@ -81,6 +81,6 @@
impl From<Token![_]> for Ident {
fn from(token: Token![_]) -> Ident {
- Ident::new("_", token.spans[0])
+ Ident::new("_", token.span)
}
}
diff --git a/src/token.rs b/src/token.rs
index a636b16..04d6967 100644
--- a/src/token.rs
+++ b/src/token.rs
@@ -503,7 +503,7 @@
#[cfg(feature = "printing")]
impl ToTokens for Underscore {
fn to_tokens(&self, tokens: &mut TokenStream) {
- tokens.append(Ident::new("_", self.spans[0]));
+ tokens.append(Ident::new("_", self.span));
}
}