From 98b1d5e8a34ef952bf2db2c46050be4a0e188777 Mon Sep 17 00:00:00 2001 From: Tongjun Gao Date: Thu, 6 Mar 2025 10:14:39 +0800 Subject: [PATCH] Adjust relevance scoring threshold to consistent with existing implementations --- crates/ide-completion/src/item.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ide-completion/src/item.rs b/crates/ide-completion/src/item.rs index b3dd8a8d06..ea52d69c79 100644 --- a/crates/ide-completion/src/item.rs +++ b/crates/ide-completion/src/item.rs @@ -350,7 +350,7 @@ impl CompletionRelevance { /// some threshold such that we think it is especially likely /// to be relevant. pub fn is_relevant(&self) -> bool { - self.score() > 0 + self.score() > (!0 / 2) } }