diff options
author | Kirill Bulatov <[email protected]> | 2021-03-07 09:58:43 +0000 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2021-03-08 21:59:20 +0000 |
commit | db61d4ea13113cd6c4e0661075ea9b2f739be862 (patch) | |
tree | dbaeb7cd9f39f076cafb27ce848b26b4e8355305 /crates/ide_completion | |
parent | c56b59d37781f6eb7caee76de2c8a1bbc9d169dc (diff) |
Rebase leftovers
Diffstat (limited to 'crates/ide_completion')
-rw-r--r-- | crates/ide_completion/src/item.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/ide_completion/src/item.rs b/crates/ide_completion/src/item.rs index 06f16a2c7..9b039e3e5 100644 --- a/crates/ide_completion/src/item.rs +++ b/crates/ide_completion/src/item.rs | |||
@@ -283,11 +283,8 @@ impl ImportEdit { | |||
283 | pub fn to_text_edit(&self, cfg: InsertUseConfig) -> Option<TextEdit> { | 283 | pub fn to_text_edit(&self, cfg: InsertUseConfig) -> Option<TextEdit> { |
284 | let _p = profile::span("ImportEdit::to_text_edit"); | 284 | let _p = profile::span("ImportEdit::to_text_edit"); |
285 | 285 | ||
286 | let rewriter = insert_use::insert_use( | 286 | let rewriter = |
287 | &self.scope, | 287 | insert_use::insert_use(&self.scope, mod_path_to_ast(&self.import.import_path), cfg); |
288 | mod_path_to_ast(&self.import.import_path), | ||
289 | cfg, | ||
290 | ); | ||
291 | let old_ast = rewriter.rewrite_root()?; | 288 | let old_ast = rewriter.rewrite_root()?; |
292 | let mut import_insert = TextEdit::builder(); | 289 | let mut import_insert = TextEdit::builder(); |
293 | algo::diff(&old_ast, &rewriter.rewrite(&old_ast)).into_text_edit(&mut import_insert); | 290 | algo::diff(&old_ast, &rewriter.rewrite(&old_ast)).into_text_edit(&mut import_insert); |