aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src
diff options
context:
space:
mode:
authorJeremy Kolb <[email protected]>2019-05-05 18:28:22 +0100
committerJeremy Kolb <[email protected]>2019-05-05 18:28:22 +0100
commit293cc81bf158e723155bfafbc08731a927873d48 (patch)
tree3087ce4328431058c825247bfa7e28b075124e6c /crates/ra_assists/src
parent3ea25a66a8deab9e20654dbc8d2bf07df2cbb6f8 (diff)
Remove collect
Diffstat (limited to 'crates/ra_assists/src')
-rw-r--r--crates/ra_assists/src/add_missing_impl_members.rs3
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(),