2997: Use proper import name in the label r=matklad a=SomeoneToIgnore



Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
This commit is contained in:
bors[bot] 2020-02-03 14:34:16 +00:00 committed by GitHub
commit 056a01502b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,16 +63,12 @@ pub(crate) fn auto_import<F: ImportsLocator>(
return None; return None;
} }
ctx.add_assist_group( ctx.add_assist_group(AssistId("auto_import"), format!("Import {}", name_to_import), || {
AssistId("auto_import"),
format!("Import {}", path_to_import_syntax),
|| {
proposed_imports proposed_imports
.into_iter() .into_iter()
.map(|import| import_to_action(import, &position, &path_to_import_syntax)) .map(|import| import_to_action(import, &position, &path_to_import_syntax))
.collect() .collect()
}, })
)
} }
fn import_to_action(import: ModPath, position: &SyntaxNode, anchor: &SyntaxNode) -> ActionBuilder { fn import_to_action(import: ModPath, position: &SyntaxNode, anchor: &SyntaxNode) -> ActionBuilder {