Skip to content

Commit 935f981

Browse files
committed
migrate merge_import to syntax_editor
1 parent 5180a80 commit 935f981

2 files changed

Lines changed: 408 additions & 272 deletions

File tree

crates/ide-db/src/imports/insert_use.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::{
1717
RootDatabase,
1818
imports::merge_imports::{
1919
MergeBehavior, NormalizationStyle, common_prefix, eq_attrs, eq_visibility,
20-
try_merge_imports, use_tree_cmp, wrap_use_tree_in_tree_list,
20+
try_merge_imports, use_tree_cmp, wrap_in_tree_list,
2121
},
2222
};
2323

@@ -251,7 +251,7 @@ fn insert_use_with_alias_option_with_editor(
251251
let mut use_tree = make.use_tree(path, None, alias, false);
252252
if mb == Some(MergeBehavior::One)
253253
&& use_tree.path().is_some()
254-
&& let Some(wrapped) = wrap_use_tree_in_tree_list(syntax_editor, &use_tree)
254+
&& let Some(wrapped) = wrap_in_tree_list(&use_tree, make)
255255
{
256256
use_tree = wrapped;
257257
}

0 commit comments

Comments
 (0)