diff options
| author | Tongjun Gao <natural_selection_@outlook.com> | 2025-03-06 10:14:39 +0800 |
|---|---|---|
| committer | Tongjun Gao <natural_selection_@outlook.com> | 2025-03-06 10:14:39 +0800 |
| commit | d95d2784da05988bf09bcbf83c460e34030b9362 (patch) | |
| tree | 756ed8e85df8430d4648858345570ccdaaa6f0c0 | |
| parent | 2cff7013c0cae5750e07bf8df33893d3275ec279 (diff) | |
| download | rust-d95d2784da05988bf09bcbf83c460e34030b9362.tar.gz rust-d95d2784da05988bf09bcbf83c460e34030b9362.zip | |
Adjust relevance scoring threshold to consistent with existing implementations
| -rw-r--r-- | src/tools/rust-analyzer/crates/ide-completion/src/item.rs | 2 |
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) } } |
