Skip to content

Commit

Permalink
Merge pull request #41 from chris-ha458/somefix
Browse files Browse the repository at this point in the history
Remove unneeded casts to `u128`.
  • Loading branch information
jedisct1 committed Aug 23, 2023
2 parents c13e1bb + 378e145 commit 226f0b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ impl<T: ?Sized> Bloom<T> {
hashes[k_i as usize] = hash;
hash
} else {
(hashes[0] as u128).wrapping_add((k_i as u128).wrapping_mul(hashes[1] as u128)) as u64
% 0xffffffffffffffc5
(hashes[0]).wrapping_add((k_i as u64).wrapping_mul(hashes[1]))
% 0xFFFF_FFFF_FFFF_FFC5u64 //largest u64 prime
}
}

Expand Down

0 comments on commit 226f0b0

Please sign in to comment.