aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/handlers/add_new.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/handlers/add_new.rs')
-rw-r--r--crates/ra_assists/src/handlers/add_new.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/handlers/add_new.rs b/crates/ra_assists/src/handlers/add_new.rs
index 0f9174a29..e8a36c7de 100644
--- a/crates/ra_assists/src/handlers/add_new.rs
+++ b/crates/ra_assists/src/handlers/add_new.rs
@@ -162,8 +162,8 @@ fn find_struct_impl(ctx: &AssistCtx, strukt: &ast::StructDef) -> Option<Option<a
162 162
163fn has_new_fn(imp: &ast::ImplDef) -> bool { 163fn has_new_fn(imp: &ast::ImplDef) -> bool {
164 if let Some(il) = imp.item_list() { 164 if let Some(il) = imp.item_list() {
165 for item in il.impl_items() { 165 for item in il.assoc_items() {
166 if let ast::ImplItem::FnDef(f) = item { 166 if let ast::AssocItem::FnDef(f) = item {
167 if let Some(name) = f.name() { 167 if let Some(name) = f.name() {
168 if name.text().eq_ignore_ascii_case("new") { 168 if name.text().eq_ignore_ascii_case("new") {
169 return true; 169 return true;