Skip to content

Commit 7d90bb1

Browse files
committed
Rename impl edit method to be more explicit
1 parent 532be0e commit 7d90bb1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/assists/src/handlers/add_missing_impl_members.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ fn add_missing_impl_members_inner(
165165
.map(|it| edit::remove_attrs_and_docs(&it));
166166

167167
let new_impl_item_list = impl_item_list.append_items(items);
168-
let new_impl_def = impl_def.with_items(new_impl_item_list);
168+
let new_impl_def = impl_def.with_assoc_item_list(new_impl_item_list);
169169
let first_new_item =
170170
new_impl_def.assoc_item_list().unwrap().assoc_items().nth(n_existing_items).unwrap();
171171

crates/syntax/src/ast/edit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ where
9595

9696
impl ast::Impl {
9797
#[must_use]
98-
pub fn with_items(&self, items: ast::AssocItemList) -> ast::Impl {
98+
pub fn with_assoc_item_list(&self, items: ast::AssocItemList) -> ast::Impl {
9999
let mut to_insert: ArrayVec<[SyntaxElement; 2]> = ArrayVec::new();
100100
if let Some(old_items) = self.assoc_item_list() {
101101
let to_replace: SyntaxElement = old_items.syntax().clone().into();

0 commit comments

Comments
 (0)