mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 01:17:27 +00:00
Merge #1247
1247: Remove collect r=matklad a=kjeremy Might help with perf Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
This commit is contained in:
commit
32db5884ad
1 changed files with 1 additions and 2 deletions
|
@ -53,11 +53,10 @@ fn add_missing_impl_members_inner(
|
|||
trait_def.syntax().descendants().find_map(ast::ItemList::cast)?.impl_items();
|
||||
let impl_items = impl_item_list.impl_items();
|
||||
|
||||
let trait_fns = trait_items.map(ImplItem::kind).filter_map(fn_def_opt).collect::<Vec<_>>();
|
||||
let trait_fns = trait_items.map(ImplItem::kind).filter_map(fn_def_opt);
|
||||
let impl_fns = impl_items.map(ImplItem::kind).filter_map(fn_def_opt).collect::<Vec<_>>();
|
||||
|
||||
trait_fns
|
||||
.into_iter()
|
||||
.filter(|t| def_name(t).is_some())
|
||||
.filter(|t| match mode {
|
||||
AddMissingImplMembersMode::DefaultMethodsOnly => t.body().is_some(),
|
||||
|
|
Loading…
Reference in a new issue