Skip to content

Commit 157fd5d

Browse files
committed
Fix scoring logic in CompletionRelevance
1 parent c003460 commit 157fd5d

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
@@ -306,7 +306,7 @@ impl CompletionRelevance {
306306
// Prefer functions with no arguments, then functions with self arguments
307307
if score > 0 {
308308
score += if !asf.has_args { 2 } else { 0 };
309-
score -= if asf.has_self_arg { 1 } else { 0 };
309+
score -= if asf.has_self_arg { score - 1 } else { 0 };
310310
}
311311

312312
score

0 commit comments

Comments
 (0)