aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r--crates/ra_ide_api/src/completion/complete_scope.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_scope.rs b/crates/ra_ide_api/src/completion/complete_scope.rs
index 2473e58b4..0f8cfaae8 100644
--- a/crates/ra_ide_api/src/completion/complete_scope.rs
+++ b/crates/ra_ide_api/src/completion/complete_scope.rs
@@ -49,7 +49,7 @@ pub(super) fn complete_scope(acc: &mut Completions, ctx: &CompletionContext) {
49 } 49 }
50} 50}
51 51
52fn build_import_label(name: &str, path: &Vec<SmolStr>) -> String { 52fn build_import_label(name: &str, path: &[SmolStr]) -> String {
53 let mut buf = String::with_capacity(64); 53 let mut buf = String::with_capacity(64);
54 buf.push_str(name); 54 buf.push_str(name);
55 buf.push_str(" ("); 55 buf.push_str(" (");
@@ -58,7 +58,7 @@ fn build_import_label(name: &str, path: &Vec<SmolStr>) -> String {
58 buf 58 buf
59} 59}
60 60
61fn fmt_import_path(path: &Vec<SmolStr>, buf: &mut String) { 61fn fmt_import_path(path: &[SmolStr], buf: &mut String) {
62 let mut segments = path.iter(); 62 let mut segments = path.iter();
63 if let Some(s) = segments.next() { 63 if let Some(s) = segments.next() {
64 buf.push_str(&s); 64 buf.push_str(&s);