From a5f57f98ca4c0afb1c292da6676a1273ce95f0e0 Mon Sep 17 00:00:00 2001 From: memoryruins Date: Fri, 15 Nov 2019 06:53:11 -0500 Subject: [PATCH] Heed the advice of rustc's into_iter() warning --- crates/ra_hir_expand/src/quote.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/ra_hir_expand/src/quote.rs b/crates/ra_hir_expand/src/quote.rs index 9cd17f0e35..35133d2164 100644 --- a/crates/ra_hir_expand/src/quote.rs +++ b/crates/ra_hir_expand/src/quote.rs @@ -241,10 +241,8 @@ mod tests { // } let struct_name = mk_ident("Foo"); let fields = [mk_ident("name"), mk_ident("id")]; - let fields = fields - .into_iter() - .map(|it| quote!(#it: self.#it.clone(), ).token_trees.clone()) - .flatten(); + let fields = + fields.iter().map(|it| quote!(#it: self.#it.clone(), ).token_trees.clone()).flatten(); let list = tt::Subtree { delimiter: tt::Delimiter::Brace, token_trees: fields.collect() };