aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2020-02-03 13:44:28 +0000
committerKirill Bulatov <[email protected]>2020-02-03 13:44:28 +0000
commitbfbc5e2d37fa28ed4f5f1c2c2c4de3b5ad966ec3 (patch)
treeec1860cffc12ff1ea3f60f474c455e6f8ea1bc49 /crates/ra_assists
parent834fcecd3152b34efc3c194ee0af530e588e0560 (diff)
Use proper import name in the label
Diffstat (limited to 'crates/ra_assists')
-rw-r--r--crates/ra_assists/src/assists/auto_import.rs16
1 files changed, 6 insertions, 10 deletions
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<F: ImportsLocator>(
63 return None; 63 return None;
64 } 64 }
65 65
66 ctx.add_assist_group( 66 ctx.add_assist_group(AssistId("auto_import"), format!("Import {}", name_to_import), || {
67 AssistId("auto_import"), 67 proposed_imports
68 format!("Import {}", path_to_import_syntax), 68 .into_iter()
69 || { 69 .map(|import| import_to_action(import, &position, &path_to_import_syntax))
70 proposed_imports 70 .collect()
71 .into_iter() 71 })
72 .map(|import| import_to_action(import, &position, &path_to_import_syntax))
73 .collect()
74 },
75 )
76} 72}
77 73
78fn import_to_action(import: ModPath, position: &SyntaxNode, anchor: &SyntaxNode) -> ActionBuilder { 74fn import_to_action(import: ModPath, position: &SyntaxNode, anchor: &SyntaxNode) -> ActionBuilder {