aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/completion/presentation.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/completion/presentation.rs')
-rw-r--r--crates/ra_ide_api/src/completion/presentation.rs4
1 files changed, 2 insertions, 2 deletions
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)