aboutsummaryrefslogtreecommitdiffstats
path: root/components/dom_struct
diff options
context:
space:
mode:
Diffstat (limited to 'components/dom_struct')
-rw-r--r--components/dom_struct/lib.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/components/dom_struct/lib.rs b/components/dom_struct/lib.rs
index 41cf4a67527..86c7134a78f 100644
--- a/components/dom_struct/lib.rs
+++ b/components/dom_struct/lib.rs
@@ -7,7 +7,6 @@
extern crate proc_macro;
use proc_macro::{TokenStream, quote};
-use std::iter;
#[proc_macro_attribute]
pub fn dom_struct(args: TokenStream, input: TokenStream) -> TokenStream {
@@ -21,7 +20,7 @@ pub fn dom_struct(args: TokenStream, input: TokenStream) -> TokenStream {
};
// Work around https://github.com/rust-lang/rust/issues/46489
- let attributes = attributes.to_string().parse().unwrap();
+ let attributes: TokenStream = attributes.to_string().parse().unwrap();
- iter::once(attributes).chain(iter::once(input)).collect()
+ attributes.into_iter().chain(input.into_iter()).collect()
}