aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists')
-rw-r--r--crates/ra_assists/src/handlers/auto_import.rs4
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 1081c9a5b..1fb701da5 100644
--- a/crates/ra_assists/src/handlers/auto_import.rs
+++ b/crates/ra_assists/src/handlers/auto_import.rs
@@ -69,10 +69,10 @@ pub(crate) fn auto_import(ctx: AssistCtx) -> Option<Assist> {
69 let mut group = ctx.add_assist_group(format!("Import {}", name_to_import)); 69 let mut group = ctx.add_assist_group(format!("Import {}", name_to_import));
70 for import in proposed_imports { 70 for import in proposed_imports {
71 group.add_assist(AssistId("auto_import"), format!("Import `{}`", &import), |edit| { 71 group.add_assist(AssistId("auto_import"), format!("Import `{}`", &import), |edit| {
72 edit.target(path_to_import_syntax.text_range()); 72 edit.target(path_under_caret.syntax().text_range());
73 insert_use_statement( 73 insert_use_statement(
74 &position, 74 &position,
75 &path_under_caret.syntax(), 75 path_under_caret.syntax(),
76 &import, 76 &import,
77 edit.text_edit_builder(), 77 edit.text_edit_builder(),
78 ); 78 );