aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists')
-rw-r--r--crates/ra_assists/src/handlers/add_missing_impl_members.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/crates/ra_assists/src/handlers/add_missing_impl_members.rs b/crates/ra_assists/src/handlers/add_missing_impl_members.rs
index 124cead6c..f185e61e5 100644
--- a/crates/ra_assists/src/handlers/add_missing_impl_members.rs
+++ b/crates/ra_assists/src/handlers/add_missing_impl_members.rs
@@ -159,7 +159,7 @@ fn add_missing_impl_members_inner(
159 .map(|it| match it { 159 .map(|it| match it {
160 ast::AssocItem::FnDef(def) => ast::AssocItem::FnDef(add_body(def)), 160 ast::AssocItem::FnDef(def) => ast::AssocItem::FnDef(add_body(def)),
161 ast::AssocItem::TypeAliasDef(def) => { 161 ast::AssocItem::TypeAliasDef(def) => {
162 ast::AssocItem::TypeAliasDef(remove_bounds(def)) 162 ast::AssocItem::TypeAliasDef(def.remove_bounds())
163 } 163 }
164 _ => it, 164 _ => it,
165 }) 165 })
@@ -191,14 +191,6 @@ fn add_missing_impl_members_inner(
191 }) 191 })
192} 192}
193 193
194fn remove_bounds(ty_def: ast::TypeAliasDef) -> ast::TypeAliasDef {
195 if let Some(name) = ty_def.name() {
196 make::type_alias_def(name, None, ty_def.type_ref())
197 } else {
198 ty_def
199 }
200}
201
202fn add_body(fn_def: ast::FnDef) -> ast::FnDef { 194fn add_body(fn_def: ast::FnDef) -> ast::FnDef {
203 if fn_def.body().is_some() { 195 if fn_def.body().is_some() {
204 return fn_def; 196 return fn_def;