mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
update relevance score u8 -> u32
This commit is contained in:
parent
10fb065b14
commit
acbe297fbd
2 changed files with 10 additions and 10 deletions
|
@ -156,7 +156,7 @@ impl CompletionRelevance {
|
|||
///
|
||||
/// See is_relevant if you need to make some judgement about score
|
||||
/// in an absolute sense.
|
||||
pub fn score(&self) -> u8 {
|
||||
pub fn score(&self) -> u32 {
|
||||
let mut score = 0;
|
||||
|
||||
if self.exact_name_match {
|
||||
|
@ -525,7 +525,7 @@ mod tests {
|
|||
.map(|r| (r.score(), r))
|
||||
.sorted_by_key(|(score, _r)| *score)
|
||||
.fold(
|
||||
(u8::MIN, vec![vec![]]),
|
||||
(u32::MIN, vec![vec![]]),
|
||||
|(mut currently_collecting_score, mut out), (score, r)| {
|
||||
if currently_collecting_score == score {
|
||||
out.last_mut().unwrap().push(r);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue