diff --git a/tokenizers/display_derive/Cargo.toml b/tokenizers/display_derive/Cargo.toml index 289d54dd1..7d7697910 100644 --- a/tokenizers/display_derive/Cargo.toml +++ b/tokenizers/display_derive/Cargo.toml @@ -7,7 +7,6 @@ edition = "2021" syn = "1.0" quote = "1.0" proc-macro2 = "1.0" -unicode-xid = "0.2.4" [lib] proc-macro = true diff --git a/tokenizers/display_derive/src/lib.rs b/tokenizers/display_derive/src/lib.rs index c4b8d5a5f..4850588b1 100644 --- a/tokenizers/display_derive/src/lib.rs +++ b/tokenizers/display_derive/src/lib.rs @@ -10,10 +10,9 @@ use vendored::FmtAttribute; pub fn display_derive(input: TokenStream) -> TokenStream { // Parse the input tokens into a syntax tree let input = parse_macro_input!(input as DeriveInput); - + return ; let attr_name = "display"; - let attrs = FmtAttributes::parse_attrs(&input.attrs, &attr_name)? - .map(Spanning::into_inner) + let attrs = FmtAttribute::parse_attrs(&input.attrs, &attr_name)? .unwrap_or_default(); let trait_ident = format_ident!("display"); let ident = &input.ident; @@ -92,8 +91,7 @@ fn expand_enum( let match_arms = e.variants.iter().try_fold( (Vec::new(), TokenStream::new()), |mut arms, variant| { - let attrs = ContainerAttributes::parse_attrs(&variant.attrs, attr_name)? - .map(Spanning::into_inner) + let attrs = FmtAttribute::parse_attrs(&variant.attrs, attr_name)? .unwrap_or_default(); let ident = &variant.ident; @@ -214,7 +212,7 @@ impl<'a> Expansion<'a> { format!( "TODO ARTHUR! struct or enum variant with more than 1 field must have \ `#[{}(\"...\", ...)]` attribute", - trait_name_to_attribute_name(self.trait_ident), + self.trait_ident, ), )), } diff --git a/tokenizers/display_derive/src/parsing.rs b/tokenizers/display_derive/src/parsing.rs index a74c3bc51..920037f65 100644 --- a/tokenizers/display_derive/src/parsing.rs +++ b/tokenizers/display_derive/src/parsing.rs @@ -4,7 +4,7 @@ use std::iter; -use unicode_xid::UnicodeXID as XID; +// use unicode_xid::UnicodeXID as XID; /// Output of the [`format_string`] parser. #[derive(Clone, Debug, Eq, PartialEq)]