use itertools::Itertools;
use stdx::format_to;
-use syntax::ast::{self, AstNode, NameOwner, StructKind, VisibilityOwner};
+use syntax::ast::{self, AstNode, HasName, HasVisibility, StructKind};
use crate::{
utils::{find_impl_block_start, find_struct_impl, generate_impl_text},
};
// Return early if we've found an existing new fn
- let impl_def = find_struct_impl(&ctx, &ast::Adt::Struct(strukt.clone()), "new")?;
+ let impl_def = find_struct_impl(ctx, &ast::Adt::Struct(strukt.clone()), "new")?;
let target = strukt.syntax().text_range();
acc.add(AssistId("generate_new", AssistKind::Generate), "Generate `new`", target, |builder| {