diff options
author | Alex Touchet <alextouchet@outlook.com> | 2018-09-11 09:06:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-11 09:06:42 -0700 |
commit | 025b5550fc6f1fd74605b09973ffc606dae7432c (patch) | |
tree | 7dfb1026318b7a0135273b667d3f44e3ee8d737d /components/dom_struct/lib.rs | |
parent | 9a7e1d17f0e054cb9f7eaafeee943a2ec5bc5e26 (diff) | |
parent | 049eb6887e29d8409b1dfe55bc31803f1c3220da (diff) | |
download | servo-025b5550fc6f1fd74605b09973ffc606dae7432c.tar.gz servo-025b5550fc6f1fd74605b09973ffc606dae7432c.zip |
Merge branch 'master' into tidy
Diffstat (limited to 'components/dom_struct/lib.rs')
-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; |