Skip to content

Commit 7bbd852

Browse files
committed
Fix scoring logic in CompletionRelevance
1 parent 07e103b commit 7bbd852

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/ide-completion/src/item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ impl CompletionRelevance {
312312
// Prefer functions with no arguments, then functions with self arguments
313313
if score > 0 {
314314
score += if !asf.has_args { 2 } else { 0 };
315-
score -= if asf.has_self_arg { 1 } else { 0 };
315+
score -= if asf.has_self_arg { score - 1 } else { 0 };
316316
}
317317

318318
score

0 commit comments

Comments
 (0)