diff options
author | memoryruins <[email protected]> | 2019-11-15 11:53:11 +0000 |
---|---|---|
committer | memoryruins <[email protected]> | 2019-11-15 12:18:10 +0000 |
commit | a5f57f98ca4c0afb1c292da6676a1273ce95f0e0 (patch) | |
tree | c9c1cf36c97933eb8e74c0da9f6c4601f89590d2 /crates/ra_hir_expand/src | |
parent | 5476c4faa34ae2ec8f736ec21e3965ed8e33c225 (diff) |
Heed the advice of rustc's into_iter() warning
Diffstat (limited to 'crates/ra_hir_expand/src')
-rw-r--r-- | crates/ra_hir_expand/src/quote.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/ra_hir_expand/src/quote.rs b/crates/ra_hir_expand/src/quote.rs index 9cd17f0e3..35133d216 100644 --- a/crates/ra_hir_expand/src/quote.rs +++ b/crates/ra_hir_expand/src/quote.rs | |||
@@ -241,10 +241,8 @@ mod tests { | |||
241 | // } | 241 | // } |
242 | let struct_name = mk_ident("Foo"); | 242 | let struct_name = mk_ident("Foo"); |
243 | let fields = [mk_ident("name"), mk_ident("id")]; | 243 | let fields = [mk_ident("name"), mk_ident("id")]; |
244 | let fields = fields | 244 | let fields = |
245 | .into_iter() | 245 | fields.iter().map(|it| quote!(#it: self.#it.clone(), ).token_trees.clone()).flatten(); |
246 | .map(|it| quote!(#it: self.#it.clone(), ).token_trees.clone()) | ||
247 | .flatten(); | ||
248 | 246 | ||
249 | let list = tt::Subtree { delimiter: tt::Delimiter::Brace, token_trees: fields.collect() }; | 247 | let list = tt::Subtree { delimiter: tt::Delimiter::Brace, token_trees: fields.collect() }; |
250 | 248 | ||