Skip to content

Commit

Permalink
Heed the advice of rustc's into_iter() warning
Browse files Browse the repository at this point in the history
  • Loading branch information
memoryruins committed Nov 15, 2019
1 parent 5476c4f commit a5f57f9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions crates/ra_hir_expand/src/quote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() };

Expand Down

0 comments on commit a5f57f9

Please sign in to comment.