diff options
Diffstat (limited to 'crates/ra_assists/src/handlers/auto_import.rs')
-rw-r--r-- | crates/ra_assists/src/handlers/auto_import.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/crates/ra_assists/src/handlers/auto_import.rs b/crates/ra_assists/src/handlers/auto_import.rs index c8bf181f9..4b62aac48 100644 --- a/crates/ra_assists/src/handlers/auto_import.rs +++ b/crates/ra_assists/src/handlers/auto_import.rs | |||
@@ -42,12 +42,7 @@ pub(crate) fn auto_import(ctx: AssistCtx) -> Option<Assist> { | |||
42 | return None; | 42 | return None; |
43 | } | 43 | } |
44 | 44 | ||
45 | let assist_group_name = if proposed_imports.len() == 1 { | 45 | let mut group = ctx.add_assist_group(auto_import_assets.get_import_group_message()); |
46 | format!("Import `{}`", proposed_imports.iter().next().unwrap()) | ||
47 | } else { | ||
48 | auto_import_assets.get_import_group_message() | ||
49 | }; | ||
50 | let mut group = ctx.add_assist_group(assist_group_name); | ||
51 | for import in proposed_imports { | 46 | for import in proposed_imports { |
52 | group.add_assist(AssistId("auto_import"), format!("Import `{}`", &import), |edit| { | 47 | group.add_assist(AssistId("auto_import"), format!("Import `{}`", &import), |edit| { |
53 | edit.target(auto_import_assets.syntax_under_caret.text_range()); | 48 | edit.target(auto_import_assets.syntax_under_caret.text_range()); |