aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/render.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-03-09 14:46:10 +0000
committerGitHub <[email protected]>2021-03-09 14:46:10 +0000
commitab99eff7b68ea327c2d327e96e7f8e0119a08516 (patch)
tree1273129880e9c1bc8f6637afec380301dc41a1d2 /crates/ide_completion/src/render.rs
parent21913d0fdb848445a908021dbcd4c3accf2ca0a5 (diff)
parentabc0ed36bdf4975dc9c5fb2ddd3f960ad2db5494 (diff)
Merge #7940
7940: Cleanup r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide_completion/src/render.rs')
-rw-r--r--crates/ide_completion/src/render.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/crates/ide_completion/src/render.rs b/crates/ide_completion/src/render.rs
index fae5685e2..0a6ac8804 100644
--- a/crates/ide_completion/src/render.rs
+++ b/crates/ide_completion/src/render.rs
@@ -246,7 +246,6 @@ impl<'a> Render<'a> {
246 } 246 }
247 }; 247 };
248 248
249 let mut ref_match = None;
250 if let ScopeDef::Local(local) = resolution { 249 if let ScopeDef::Local(local) = resolution {
251 if let Some((active_name, active_type)) = self.ctx.active_name_and_type() { 250 if let Some((active_name, active_type)) = self.ctx.active_name_and_type() {
252 let ty = local.ty(self.ctx.db()); 251 let ty = local.ty(self.ctx.db());
@@ -255,7 +254,11 @@ impl<'a> Render<'a> {
255 { 254 {
256 item = item.set_score(score); 255 item = item.set_score(score);
257 } 256 }
258 ref_match = refed_type_matches(&active_type, &active_name, &ty, &local_name); 257 if let Some(ref_match) =
258 refed_type_matches(&active_type, &active_name, &ty, &local_name)
259 {
260 item = item.ref_match(ref_match);
261 }
259 } 262 }
260 } 263 }
261 264
@@ -285,7 +288,6 @@ impl<'a> Render<'a> {
285 Some( 288 Some(
286 item.kind(kind) 289 item.kind(kind)
287 .add_import(import_to_add) 290 .add_import(import_to_add)
288 .set_ref_match(ref_match)
289 .set_documentation(self.docs(resolution)) 291 .set_documentation(self.docs(resolution))
290 .set_deprecated(self.is_deprecated(resolution)) 292 .set_deprecated(self.is_deprecated(resolution))
291 .build(), 293 .build(),