Migrate twox-hash -> xxhash_rust. Switch to Xxh3 for better performance.
xxhash-rust is more maintained, built against `::core`, so no workaround for wasm is necessary. Switch to Xxh3 for better performance, which shows when loading/hashing image buffers.
This commit is contained in:
parent
751ea77c29
commit
98e088e731
6 changed files with 8 additions and 19 deletions
|
|
@ -1,6 +1,7 @@
|
|||
/// The hasher used to compare layouts.
|
||||
#[derive(Debug, Default)]
|
||||
pub struct Hasher(twox_hash::XxHash64);
|
||||
#[allow(missing_debug_implementations)] // Doesn't really make sense to have debug on the hasher state anyways.
|
||||
#[derive(Default)]
|
||||
pub struct Hasher(xxhash_rust::xxh3::Xxh3);
|
||||
|
||||
impl core::hash::Hasher for Hasher {
|
||||
fn write(&mut self, bytes: &[u8]) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue