aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src')
-rw-r--r--crates/ra_ide/src/completion/complete_scope.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/crates/ra_ide/src/completion/complete_scope.rs b/crates/ra_ide/src/completion/complete_scope.rs
index 64b04ec2b..aaa9985d4 100644
--- a/crates/ra_ide/src/completion/complete_scope.rs
+++ b/crates/ra_ide/src/completion/complete_scope.rs
@@ -1,6 +1,6 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3use ra_assists::auto_import_text_edit; 3use ra_assists::insert_use_statement;
4use ra_syntax::{ast, AstNode, SmolStr}; 4use ra_syntax::{ast, AstNode, SmolStr};
5use ra_text_edit::TextEditBuilder; 5use ra_text_edit::TextEditBuilder;
6use rustc_hash::FxHashMap; 6use rustc_hash::FxHashMap;
@@ -26,12 +26,7 @@ pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) {
26 let edit = { 26 let edit = {
27 let mut builder = TextEditBuilder::default(); 27 let mut builder = TextEditBuilder::default();
28 builder.replace(ctx.source_range(), name.to_string()); 28 builder.replace(ctx.source_range(), name.to_string());
29 auto_import_text_edit( 29 insert_use_statement(&ctx.token.parent(), &ctx.token.parent(), &path, &mut builder);
30 &ctx.token.parent(),
31 &ctx.token.parent(),
32 &path,
33 &mut builder,
34 );
35 builder.finish() 30 builder.finish()
36 }; 31 };
37 32