about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLukas Wirth <lukastw97@gmail.com>2025-03-06 08:05:46 +0000
committerGitHub <noreply@github.com>2025-03-06 08:05:46 +0000
commit86741ea6fd1c43ac397799da6e0277bb74f350f2 (patch)
tree756ed8e85df8430d4648858345570ccdaaa6f0c0
parent2cff7013c0cae5750e07bf8df33893d3275ec279 (diff)
parentd95d2784da05988bf09bcbf83c460e34030b9362 (diff)
downloadrust-86741ea6fd1c43ac397799da6e0277bb74f350f2.tar.gz
rust-86741ea6fd1c43ac397799da6e0277bb74f350f2.zip
Merge pull request #19297 from Natural-selection1/master
Adjust relevance scoring threshold to consistent with existing implem…
-rw-r--r--src/tools/rust-analyzer/crates/ide-completion/src/item.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/rust-analyzer/crates/ide-completion/src/item.rs b/src/tools/rust-analyzer/crates/ide-completion/src/item.rs
index b3dd8a8d06e..ea52d69c795 100644
--- a/src/tools/rust-analyzer/crates/ide-completion/src/item.rs
+++ b/src/tools/rust-analyzer/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)
     }
 }