diff --git a/crates/ide_db/src/imports/merge_imports.rs b/crates/ide_db/src/imports/merge_imports.rs index d4e85db16e..c7d9034f74 100644 --- a/crates/ide_db/src/imports/merge_imports.rs +++ b/crates/ide_db/src/imports/merge_imports.rs @@ -129,7 +129,7 @@ fn recursive_merge(lhs: &ast::UseTree, rhs: &ast::UseTree, merge: MergeBehavior) _ => (), } - if lhs_t.use_tree_list().is_none() && rhs_t.use_tree_list().is_none() { + if lhs_t.is_simple_path() && rhs_t.is_simple_path() { continue; } } diff --git a/crates/syntax/src/ast/edit_in_place.rs b/crates/syntax/src/ast/edit_in_place.rs index 296c6bfec0..19edead30a 100644 --- a/crates/syntax/src/ast/edit_in_place.rs +++ b/crates/syntax/src/ast/edit_in_place.rs @@ -328,7 +328,7 @@ impl ast::UseTree { return; } // At this point, prefix path is detached; _self_ use tree has suffix path. - // Next, transoform 'suffix' use tree into 'prefix::{suffix}' + // Next, transform 'suffix' use tree into 'prefix::{suffix}' let subtree = self.clone_subtree().clone_for_update(); ted::remove_all_iter(self.syntax().children_with_tokens()); ted::insert(Position::first_child_of(self.syntax()), prefix.syntax());