mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-11 20:58:54 +00:00
Rebase leftovers
This commit is contained in:
parent
c56b59d377
commit
db61d4ea13
1 changed files with 2 additions and 5 deletions
|
@ -283,11 +283,8 @@ impl ImportEdit {
|
|||
pub fn to_text_edit(&self, cfg: InsertUseConfig) -> Option<TextEdit> {
|
||||
let _p = profile::span("ImportEdit::to_text_edit");
|
||||
|
||||
let rewriter = insert_use::insert_use(
|
||||
&self.scope,
|
||||
mod_path_to_ast(&self.import.import_path),
|
||||
cfg,
|
||||
);
|
||||
let rewriter =
|
||||
insert_use::insert_use(&self.scope, mod_path_to_ast(&self.import.import_path), cfg);
|
||||
let old_ast = rewriter.rewrite_root()?;
|
||||
let mut import_insert = TextEdit::builder();
|
||||
algo::diff(&old_ast, &rewriter.rewrite(&old_ast)).into_text_edit(&mut import_insert);
|
||||
|
|
Loading…
Reference in a new issue