diff options
Diffstat (limited to 'src/pattern/fuzzy_pattern.rs')
-rw-r--r-- | src/pattern/fuzzy_pattern.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pattern/fuzzy_pattern.rs b/src/pattern/fuzzy_pattern.rs index 457b5bc..d38036c 100644 --- a/src/pattern/fuzzy_pattern.rs +++ b/src/pattern/fuzzy_pattern.rs @@ -146,7 +146,7 @@ impl FuzzyPattern { let match_len = 1 + cand_idx - pos[0]; let mut score = BONUS_MATCH; score += BONUS_CANDIDATE_LENGTH * (cand_chars.len() as i32); - score += BONUS_SINGLED_CHAR * (nb_singled_chars as i32); + score += BONUS_SINGLED_CHAR * nb_singled_chars; score += BONUS_NB_HOLES * (nb_holes as i32); score += match_len as i32 * BONUS_MATCH_LENGTH; if pos[0] == 0 { |