aboutsummaryrefslogtreecommitdiff
path: root/src/util/data.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-03-19 12:19:40 +0100
committerAlex Auvolat <alex@adnab.me>2021-03-19 12:19:40 +0100
commitfd8f4caa8133d509610b13ee99ac60d1adadaca3 (patch)
treed19885d39e0bde7ddcc14c034bc5518edbf985a6 /src/util/data.rs
parent4c26a0b9c17fee84a64cd79a6b31968fd48effe6 (diff)
downloadgarage-fd8f4caa8133d509610b13ee99ac60d1adadaca3.tar.gz
garage-fd8f4caa8133d509610b13ee99ac60d1adadaca3.zip
Support old CPUsmaster
Diffstat (limited to 'src/util/data.rs')
-rw-r--r--src/util/data.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/util/data.rs b/src/util/data.rs
index cb784730..8cd6dd96 100644
--- a/src/util/data.rs
+++ b/src/util/data.rs
@@ -106,12 +106,11 @@ pub fn blake2sum(data: &[u8]) -> Hash {
pub type FastHash = u64;
pub fn fasthash(data: &[u8]) -> FastHash {
- use fasthash::{xx::Hasher64, FastHasher};
- use std::hash::Hasher;
+ use xxhash_rust::xxh3::Xxh3;
- let mut h = Hasher64::new();
- h.write(data);
- h.finish()
+ let mut h = Xxh3::new();
+ h.update(data);
+ h.digest()
}
pub fn gen_uuid() -> UUID {