File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
crates/ide_completion/src Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -430,11 +430,8 @@ impl Builder {
430
430
self . import_to_add = import_to_add;
431
431
self
432
432
}
433
- pub ( crate ) fn set_ref_match (
434
- mut self ,
435
- ref_match : Option < ( Mutability , CompletionScore ) > ,
436
- ) -> Builder {
437
- self . ref_match = ref_match;
433
+ pub ( crate ) fn ref_match ( mut self , ref_match : ( Mutability , CompletionScore ) ) -> Builder {
434
+ self . ref_match = Some ( ref_match) ;
438
435
self
439
436
}
440
437
}
Original file line number Diff line number Diff line change @@ -246,7 +246,6 @@ impl<'a> Render<'a> {
246
246
}
247
247
} ;
248
248
249
- let mut ref_match = None ;
250
249
if let ScopeDef :: Local ( local) = resolution {
251
250
if let Some ( ( active_name, active_type) ) = self . ctx . active_name_and_type ( ) {
252
251
let ty = local. ty ( self . ctx . db ( ) ) ;
@@ -255,7 +254,11 @@ impl<'a> Render<'a> {
255
254
{
256
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
288
Some (
286
289
item. kind ( kind)
287
290
. add_import ( import_to_add)
288
- . set_ref_match ( ref_match)
289
291
. set_documentation ( self . docs ( resolution) )
290
292
. set_deprecated ( self . is_deprecated ( resolution) )
291
293
. build ( ) ,
You can’t perform that action at this time.
0 commit comments