Skip to content

Commit 0fdca45

Browse files
committed
Improve auto import message
1 parent dc713ea commit 0fdca45

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

crates/ra_assists/src/assists/auto_import.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,16 @@ pub(crate) fn auto_import<F: ImportsLocator>(
6464
return None;
6565
}
6666

67-
ctx.add_assist_group(AssistId("auto_import"), "auto import", || {
68-
proposed_imports
69-
.into_iter()
70-
.map(|import| import_to_action(import, &position, &path_to_import_syntax))
71-
.collect()
72-
})
67+
ctx.add_assist_group(
68+
AssistId("auto_import"),
69+
format!("Import {}", path_to_import_syntax),
70+
|| {
71+
proposed_imports
72+
.into_iter()
73+
.map(|import| import_to_action(import, &position, &path_to_import_syntax))
74+
.collect()
75+
},
76+
)
7377
}
7478

7579
fn import_to_action(import: String, position: &SyntaxNode, anchor: &SyntaxNode) -> ActionBuilder {

0 commit comments

Comments
 (0)