diff options
author | Josh Mcguigan <[email protected]> | 2021-03-12 14:08:07 +0000 |
---|---|---|
committer | Josh Mcguigan <[email protected]> | 2021-03-12 14:16:04 +0000 |
commit | acbe297fbd10250e0d99d1e3e98751dd6ef77adc (patch) | |
tree | 5ff7a667e2d10a69333af496b75a85a637f0488c /crates/ide_completion | |
parent | 10fb065b146d7d03a65bbc73cdb34d32523dafa1 (diff) |
update relevance score u8 -> u32
Diffstat (limited to 'crates/ide_completion')
-rw-r--r-- | crates/ide_completion/src/item.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide_completion/src/item.rs b/crates/ide_completion/src/item.rs index 352640e3b..3febab32b 100644 --- a/crates/ide_completion/src/item.rs +++ b/crates/ide_completion/src/item.rs | |||
@@ -156,7 +156,7 @@ impl CompletionRelevance { | |||
156 | /// | 156 | /// |
157 | /// See is_relevant if you need to make some judgement about score | 157 | /// See is_relevant if you need to make some judgement about score |
158 | /// in an absolute sense. | 158 | /// in an absolute sense. |
159 | pub fn score(&self) -> u8 { | 159 | pub fn score(&self) -> u32 { |
160 | let mut score = 0; | 160 | let mut score = 0; |
161 | 161 | ||
162 | if self.exact_name_match { | 162 | if self.exact_name_match { |
@@ -525,7 +525,7 @@ mod tests { | |||
525 | .map(|r| (r.score(), r)) | 525 | .map(|r| (r.score(), r)) |
526 | .sorted_by_key(|(score, _r)| *score) | 526 | .sorted_by_key(|(score, _r)| *score) |
527 | .fold( | 527 | .fold( |
528 | (u8::MIN, vec![vec![]]), | 528 | (u32::MIN, vec![vec![]]), |
529 | |(mut currently_collecting_score, mut out), (score, r)| { | 529 | |(mut currently_collecting_score, mut out), (score, r)| { |
530 | if currently_collecting_score == score { | 530 | if currently_collecting_score == score { |
531 | out.last_mut().unwrap().push(r); | 531 | out.last_mut().unwrap().push(r); |