aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion
diff options
context:
space:
mode:
authorkjeremy <[email protected]>2019-10-30 17:36:37 +0000
committerkjeremy <[email protected]>2019-10-30 17:36:37 +0000
commitb441b4e8effeaf4532fd2e45c4d864480857c49e (patch)
tree5f25f7478b8ec365b2a2d5f7bea4ec2386bdd244 /crates/ra_ide_api/src/completion
parent5806195bc1cdb1ca3fa257e99fd6e0dd897713a9 (diff)
Some clippy fixes
Diffstat (limited to 'crates/ra_ide_api/src/completion')
-rw-r--r--crates/ra_ide_api/src/completion/complete_path.rs2
-rw-r--r--crates/ra_ide_api/src/completion/presentation.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_path.rs b/crates/ra_ide_api/src/completion/complete_path.rs
index 956d8ce49..a58fdc036 100644
--- a/crates/ra_ide_api/src/completion/complete_path.rs
+++ b/crates/ra_ide_api/src/completion/complete_path.rs
@@ -67,7 +67,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
67 }); 67 });
68 } 68 }
69 } 69 }
70 _ => return, 70 _ => {}
71 }; 71 };
72} 72}
73 73
diff --git a/crates/ra_ide_api/src/completion/presentation.rs b/crates/ra_ide_api/src/completion/presentation.rs
index f7e98e6df..65bb639ed 100644
--- a/crates/ra_ide_api/src/completion/presentation.rs
+++ b/crates/ra_ide_api/src/completion/presentation.rs
@@ -136,7 +136,7 @@ impl Completions {
136 for (idx, s) in docs.match_indices(&macro_name) { 136 for (idx, s) in docs.match_indices(&macro_name) {
137 let (before, after) = (&docs[..idx], &docs[idx + s.len()..]); 137 let (before, after) = (&docs[..idx], &docs[idx + s.len()..]);
138 // Ensure to match the full word 138 // Ensure to match the full word
139 if after.starts_with("!") 139 if after.starts_with('!')
140 && before 140 && before
141 .chars() 141 .chars()
142 .rev() 142 .rev()
@@ -225,7 +225,7 @@ impl Completions {
225 } else { 225 } else {
226 (format!("{}($0)", data.name()), format!("{}(…)", name)) 226 (format!("{}($0)", data.name()), format!("{}(…)", name))
227 }; 227 };
228 builder = builder.lookup_by(name.clone()).label(label).insert_snippet(snippet); 228 builder = builder.lookup_by(name).label(label).insert_snippet(snippet);
229 } 229 }
230 230
231 self.add(builder) 231 self.add(builder)