Skip to content

Commit

Permalink
Update twoxhash to 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Feb 26, 2025
1 parent 6c55d4f commit 04c7510
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
14 changes: 2 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ serde = { version = "1.0.110", default-features = false }
serde-json-core = { version = "0.4.0", default-features = false }
smallvec = { version = "1.10.0", default-features = false }
stable_deref_trait = { version = "1.2.0", default-features = false }
twox-hash = { version = "1.4.2", default-features = false }
twox-hash = { version = "2.0.0", default-features = false, features = ["xxhash64"] }
unicode-bidi = { version = "0.3.11", default-features = false }
utf16_iter = { version = "1.0.2", default-features = false }
utf8_iter = { version = "1.0.2", default-features = false }
Expand Down
5 changes: 1 addition & 4 deletions provider/blob/tests/test_versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use icu_provider::prelude::*;
use icu_provider_blob::export::*;
use icu_provider_blob::BlobDataProvider;
use std::collections::BTreeSet;
use std::hash::Hasher;

const BLOB_V3: &[u8] = include_bytes!("data/v3.postcard");

Expand Down Expand Up @@ -134,9 +133,7 @@ fn test_format_bigger() {
// Rather than check in a 10MB file, we just compute hashes
println!("Computing hash ....");
// Construct a hasher with a random, stable seed
let mut hasher = twox_hash::XxHash64::with_seed(1234);
hasher.write(&blob);
let hash = hasher.finish();
let hash = twox_hash::XxHash64::oneshot(1234, &blob);

assert_eq!(
hash, 9019763565456414394,
Expand Down

0 comments on commit 04c7510

Please sign in to comment.