diff options
Diffstat (limited to 'components/dom_struct')
-rw-r--r-- | components/dom_struct/lib.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/components/dom_struct/lib.rs b/components/dom_struct/lib.rs index 0fa5f4f8163..442aa6cf2cd 100644 --- a/components/dom_struct/lib.rs +++ b/components/dom_struct/lib.rs @@ -25,7 +25,6 @@ pub fn dom_struct(args: TokenStream, input: TokenStream) -> TokenStream { // Work around https://github.com/rust-lang/rust/issues/46489 let attributes: TokenStream = attributes.to_string().parse().unwrap(); - let output: TokenStream = attributes.into_iter().chain(input.into_iter()).collect(); let item: Item = syn::parse(output).unwrap(); @@ -36,7 +35,11 @@ pub fn dom_struct(args: TokenStream, input: TokenStream) -> TokenStream { return quote!(#s2).into(); } if let Fields::Named(ref f) = s.fields { - let f = f.named.first().expect("Must have at least one field").into_value(); + let f = f + .named + .first() + .expect("Must have at least one field") + .into_value(); let ident = f.ident.as_ref().expect("Must have named fields"); let name = &s.ident; let ty = &f.ty; |