This commit is contained in:
numbers
2023-09-19 18:42:44 -04:00
parent a5fe71ebb3
commit 31d80c4a56

View File

@@ -26,11 +26,11 @@ pub const fn hash32(bytes: &[u32]) -> u64 {
}
//noinspection DuplicatedCode
pub const fn hash64(bytes: &[u32]) -> u64 {
pub const fn hash64(bytes: &[u64]) -> u64 {
let mut hash = INITIAL_STATE;
let mut i = 0;
while i < bytes.len() {
hash = hash ^ bytes[i] as u64;
hash = hash ^ bytes[i];
hash = hash.wrapping_mul(PRIME);
i += 1;
}