aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/handlers/generate_new.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/assists/src/handlers/generate_new.rs')
-rw-r--r--crates/assists/src/handlers/generate_new.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/assists/src/handlers/generate_new.rs b/crates/assists/src/handlers/generate_new.rs
index 307f2e228..a9203d33f 100644
--- a/crates/assists/src/handlers/generate_new.rs
+++ b/crates/assists/src/handlers/generate_new.rs
@@ -40,7 +40,7 @@ pub(crate) fn generate_new(acc: &mut Assists, ctx: &AssistContext) -> Option<()>
40 }; 40 };
41 41
42 // Return early if we've found an existing new fn 42 // Return early if we've found an existing new fn
43 let impl_def = find_struct_impl(&ctx, &ast::AdtDef::Struct(strukt.clone()), "new")?; 43 let impl_def = find_struct_impl(&ctx, &ast::Adt::Struct(strukt.clone()), "new")?;
44 44
45 let target = strukt.syntax().text_range(); 45 let target = strukt.syntax().text_range();
46 acc.add(AssistId("generate_new", AssistKind::Generate), "Generate `new`", target, |builder| { 46 acc.add(AssistId("generate_new", AssistKind::Generate), "Generate `new`", target, |builder| {