feat: Do the sum of typos using usizes

This commit is contained in:
Clément Renault 2019-01-06 18:04:54 +01:00
parent 32f8908d71
commit 966eda8ae5
No known key found for this signature in database
GPG Key ID: 0151CDAB43460DAE

View File

@ -18,7 +18,7 @@ fn sum_matches_typos(matches: &[Match]) -> isize {
// note that GroupBy will never return an empty group // note that GroupBy will never return an empty group
// so we can do this assumption safely // so we can do this assumption safely
for group in GroupBy::new(matches, match_query_index) { for group in GroupBy::new(matches, match_query_index) {
sum_typos += unsafe { group.get_unchecked(0).distance } as isize; sum_typos += unsafe { group.get_unchecked(0).distance as isize };
number_words += 1; number_words += 1;
} }