diff options
Diffstat (limited to 'crates/ra_assists/src/handlers/auto_import.rs')
-rw-r--r-- | crates/ra_assists/src/handlers/auto_import.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/handlers/auto_import.rs b/crates/ra_assists/src/handlers/auto_import.rs index 84b5474f9..4514b8691 100644 --- a/crates/ra_assists/src/handlers/auto_import.rs +++ b/crates/ra_assists/src/handlers/auto_import.rs | |||
@@ -7,7 +7,7 @@ use ra_syntax::{ | |||
7 | 7 | ||
8 | use crate::{ | 8 | use crate::{ |
9 | assist_ctx::{ActionBuilder, Assist, AssistCtx}, | 9 | assist_ctx::{ActionBuilder, Assist, AssistCtx}, |
10 | auto_import_text_edit, AssistId, | 10 | insert_use_statement, AssistId, |
11 | }; | 11 | }; |
12 | use std::collections::BTreeSet; | 12 | use std::collections::BTreeSet; |
13 | 13 | ||
@@ -78,7 +78,7 @@ pub(crate) fn auto_import(ctx: AssistCtx) -> Option<Assist> { | |||
78 | fn import_to_action(import: ModPath, position: &SyntaxNode, anchor: &SyntaxNode) -> ActionBuilder { | 78 | fn import_to_action(import: ModPath, position: &SyntaxNode, anchor: &SyntaxNode) -> ActionBuilder { |
79 | let mut action_builder = ActionBuilder::default(); | 79 | let mut action_builder = ActionBuilder::default(); |
80 | action_builder.label(format!("Import `{}`", &import)); | 80 | action_builder.label(format!("Import `{}`", &import)); |
81 | auto_import_text_edit(position, anchor, &import, action_builder.text_edit_builder()); | 81 | insert_use_statement(position, anchor, &import, action_builder.text_edit_builder()); |
82 | action_builder | 82 | action_builder |
83 | } | 83 | } |
84 | 84 | ||