mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 04:53:34 +00:00
Heed the advice of rustc's into_iter() warning
This commit is contained in:
parent
5476c4faa3
commit
a5f57f98ca
1 changed files with 2 additions and 4 deletions
|
@ -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() };
|
||||
|
||||
|
|
Loading…
Reference in a new issue