diff options
author | Alan Du <[email protected]> | 2019-06-04 06:51:25 +0100 |
---|---|---|
committer | Alan Du <[email protected]> | 2019-06-04 23:05:07 +0100 |
commit | fafca4cb11c0580ff10111d3ca44d4569932b125 (patch) | |
tree | 47a2a430262eb839222e98a1decd6ead7630e394 /crates | |
parent | 4e449fb0b0d5fca99d0aaf481539fa9ec662a8c2 (diff) |
Fix clippy::ptr_arg
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ra_hir/src/expr/validation.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_scope.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_hir/src/expr/validation.rs b/crates/ra_hir/src/expr/validation.rs index 2816144a7..0248b087d 100644 --- a/crates/ra_hir/src/expr/validation.rs +++ b/crates/ra_hir/src/expr/validation.rs | |||
@@ -44,7 +44,7 @@ impl<'a, 'b> ExprValidator<'a, 'b> { | |||
44 | &mut self, | 44 | &mut self, |
45 | id: ExprId, | 45 | id: ExprId, |
46 | _path: &Option<Path>, | 46 | _path: &Option<Path>, |
47 | fields: &Vec<StructLitField>, | 47 | fields: &[StructLitField], |
48 | spread: &Option<ExprId>, | 48 | spread: &Option<ExprId>, |
49 | db: &impl HirDatabase, | 49 | db: &impl HirDatabase, |
50 | ) { | 50 | ) { |
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 | ||
52 | fn build_import_label(name: &str, path: &Vec<SmolStr>) -> String { | 52 | fn 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 | ||
61 | fn fmt_import_path(path: &Vec<SmolStr>, buf: &mut String) { | 61 | fn 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); |