Use proper import name in the label

This commit is contained in:
Kirill Bulatov 2020-02-03 15:44:28 +02:00
parent 834fcecd31
commit bfbc5e2d37

View file

@ -63,16 +63,12 @@ pub(crate) fn auto_import<F: ImportsLocator>(
return None;
}
ctx.add_assist_group(
AssistId("auto_import"),
format!("Import {}", path_to_import_syntax),
|| {
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 {