mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +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 struct_name = mk_ident("Foo");
|
||||||
let fields = [mk_ident("name"), mk_ident("id")];
|
let fields = [mk_ident("name"), mk_ident("id")];
|
||||||
let fields = fields
|
let fields =
|
||||||
.into_iter()
|
fields.iter().map(|it| quote!(#it: self.#it.clone(), ).token_trees.clone()).flatten();
|
||||||
.map(|it| quote!(#it: self.#it.clone(), ).token_trees.clone())
|
|
||||||
.flatten();
|
|
||||||
|
|
||||||
let list = tt::Subtree { delimiter: tt::Delimiter::Brace, token_trees: fields.collect() };
|
let list = tt::Subtree { delimiter: tt::Delimiter::Brace, token_trees: fields.collect() };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue