From bfbc5e2d37fa28ed4f5f1c2c2c4de3b5ad966ec3 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Mon, 3 Feb 2020 15:44:28 +0200 Subject: Use proper import name in the label --- crates/ra_assists/src/assists/auto_import.rs | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'crates') diff --git a/crates/ra_assists/src/assists/auto_import.rs b/crates/ra_assists/src/assists/auto_import.rs index e908ab1fc..2068256b0 100644 --- a/crates/ra_assists/src/assists/auto_import.rs +++ b/crates/ra_assists/src/assists/auto_import.rs @@ -63,16 +63,12 @@ pub(crate) fn auto_import( return None; } - ctx.add_assist_group( - AssistId("auto_import"), - format!("Import {}", path_to_import_syntax), - || { - proposed_imports - .into_iter() - .map(|import| import_to_action(import, &position, &path_to_import_syntax)) - .collect() - }, - ) + ctx.add_assist_group(AssistId("auto_import"), format!("Import {}", name_to_import), || { + proposed_imports + .into_iter() + .map(|import| import_to_action(import, &position, &path_to_import_syntax)) + .collect() + }) } fn import_to_action(import: ModPath, position: &SyntaxNode, anchor: &SyntaxNode) -> ActionBuilder { -- cgit v1.2.3