From fafca4cb11c0580ff10111d3ca44d4569932b125 Mon Sep 17 00:00:00 2001 From: Alan Du Date: Tue, 4 Jun 2019 01:51:25 -0400 Subject: Fix clippy::ptr_arg --- crates/ra_ide_api/src/completion/complete_scope.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide_api') 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) { } } -fn build_import_label(name: &str, path: &Vec) -> String { +fn build_import_label(name: &str, path: &[SmolStr]) -> String { let mut buf = String::with_capacity(64); buf.push_str(name); buf.push_str(" ("); @@ -58,7 +58,7 @@ fn build_import_label(name: &str, path: &Vec) -> String { buf } -fn fmt_import_path(path: &Vec, buf: &mut String) { +fn fmt_import_path(path: &[SmolStr], buf: &mut String) { let mut segments = path.iter(); if let Some(s) = segments.next() { buf.push_str(&s); -- cgit v1.2.3