mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Use proper import name in the label
This commit is contained in:
parent
834fcecd31
commit
bfbc5e2d37
1 changed files with 6 additions and 10 deletions
|
@ -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),
|
||||
|| {
|
||||
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 {
|
||||
|
|
Loading…
Reference in a new issue