fix: merge_imports::recursive_merge
exiting early
This commit is contained in:
parent
b4c608896c
commit
c8c21aabff
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user