aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-02-03 14:34:16 +0000
committerGitHub <[email protected]>2020-02-03 14:34:16 +0000
commit056a01502b7a072f16db0e81eeb99ed8508d2ee6 (patch)
tree37407261123526397fe91c2fc6fec801dcbfa3c0 /crates/ra_assists/src
parentc57ed0cfb29bc2b311299eebb4f7820a31068a37 (diff)
parentbfbc5e2d37fa28ed4f5f1c2c2c4de3b5ad966ec3 (diff)
Merge #2997
2997: Use proper import name in the label r=matklad a=SomeoneToIgnore Co-authored-by: Kirill Bulatov <[email protected]>
Diffstat (limited to 'crates/ra_assists/src')
-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 {