diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-05 18:32:18 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-05-05 18:32:18 +0100 |
commit | 32db5884ada59c72aa7ab9f88910ef7c8f882e7d (patch) | |
tree | 3087ce4328431058c825247bfa7e28b075124e6c /crates/ra_assists/src | |
parent | 3ea25a66a8deab9e20654dbc8d2bf07df2cbb6f8 (diff) | |
parent | 293cc81bf158e723155bfafbc08731a927873d48 (diff) |
Merge #1247
1247: Remove collect r=matklad a=kjeremy
Might help with perf
Co-authored-by: Jeremy Kolb <[email protected]>
Diffstat (limited to 'crates/ra_assists/src')
-rw-r--r-- | crates/ra_assists/src/add_missing_impl_members.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_assists/src/add_missing_impl_members.rs b/crates/ra_assists/src/add_missing_impl_members.rs index 17c2af899..23c01e747 100644 --- a/crates/ra_assists/src/add_missing_impl_members.rs +++ b/crates/ra_assists/src/add_missing_impl_members.rs | |||
@@ -53,11 +53,10 @@ fn add_missing_impl_members_inner( | |||
53 | trait_def.syntax().descendants().find_map(ast::ItemList::cast)?.impl_items(); | 53 | trait_def.syntax().descendants().find_map(ast::ItemList::cast)?.impl_items(); |
54 | let impl_items = impl_item_list.impl_items(); | 54 | let impl_items = impl_item_list.impl_items(); |
55 | 55 | ||
56 | let trait_fns = trait_items.map(ImplItem::kind).filter_map(fn_def_opt).collect::<Vec<_>>(); | 56 | let trait_fns = trait_items.map(ImplItem::kind).filter_map(fn_def_opt); |
57 | let impl_fns = impl_items.map(ImplItem::kind).filter_map(fn_def_opt).collect::<Vec<_>>(); | 57 | let impl_fns = impl_items.map(ImplItem::kind).filter_map(fn_def_opt).collect::<Vec<_>>(); |
58 | 58 | ||
59 | trait_fns | 59 | trait_fns |
60 | .into_iter() | ||
61 | .filter(|t| def_name(t).is_some()) | 60 | .filter(|t| def_name(t).is_some()) |
62 | .filter(|t| match mode { | 61 | .filter(|t| match mode { |
63 | AddMissingImplMembersMode::DefaultMethodsOnly => t.body().is_some(), | 62 | AddMissingImplMembersMode::DefaultMethodsOnly => t.body().is_some(), |