From 966eda8ae5c4fa1eb2ff9798a8c080a9e0c2b6d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Sun, 6 Jan 2019 18:04:54 +0100 Subject: [PATCH] feat: Do the sum of typos using usizes --- src/rank/criterion/sum_of_typos.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rank/criterion/sum_of_typos.rs b/src/rank/criterion/sum_of_typos.rs index 085ad19cc..ac6340591 100644 --- a/src/rank/criterion/sum_of_typos.rs +++ b/src/rank/criterion/sum_of_typos.rs @@ -18,7 +18,7 @@ fn sum_matches_typos(matches: &[Match]) -> isize { // note that GroupBy will never return an empty group // so we can do this assumption safely 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; }