From 0ff8c55246d242af2f2fc4f88e67395320d00865 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Wed, 26 Feb 2020 13:24:00 +0300 Subject: Unfold groups with single assists into plain assists --- crates/ra_assists/src/handlers/auto_import.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'crates/ra_assists/src/handlers') 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 { return None; } - let assist_group_name = if proposed_imports.len() == 1 { - format!("Import `{}`", proposed_imports.iter().next().unwrap()) - } else { - auto_import_assets.get_import_group_message() - }; - let mut group = ctx.add_assist_group(assist_group_name); + let mut group = ctx.add_assist_group(auto_import_assets.get_import_group_message()); for import in proposed_imports { group.add_assist(AssistId("auto_import"), format!("Import `{}`", &import), |edit| { edit.target(auto_import_assets.syntax_under_caret.text_range()); -- cgit v1.2.3