From 740a26b7d26a68cc46becda3cca39091e8da67fc Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Fri, 7 Feb 2020 23:35:34 +0200 Subject: Rename add import assist --- crates/ra_ide/src/completion/complete_scope.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'crates/ra_ide/src/completion') 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 @@ //! FIXME: write short doc here -use ra_assists::auto_import_text_edit; +use ra_assists::insert_use_statement; use ra_syntax::{ast, AstNode, SmolStr}; use ra_text_edit::TextEditBuilder; use rustc_hash::FxHashMap; @@ -26,12 +26,7 @@ pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) { let edit = { let mut builder = TextEditBuilder::default(); builder.replace(ctx.source_range(), name.to_string()); - auto_import_text_edit( - &ctx.token.parent(), - &ctx.token.parent(), - &path, - &mut builder, - ); + insert_use_statement(&ctx.token.parent(), &ctx.token.parent(), &path, &mut builder); builder.finish() }; -- cgit v1.2.3