Mercurial > forks > mercurial
changeset 53261:aed2aee075c2
rust-hg-core: update `two-xhash` dependency
It is good to refresh our dependencies every cycle to get the latest
perf improvements, bugfixes etc.
This update is done in a separate changeset because of a breaking change.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Wed, 26 Mar 2025 12:01:59 +0100 |
parents | fc55ffef89fe |
children | caa6f6ffff8b |
files | rust/Cargo.lock rust/hg-core/Cargo.toml rust/hg-core/src/lib.rs |
diffstat | 3 files changed, 6 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/rust/Cargo.lock Wed Mar 26 12:00:38 2025 +0100 +++ b/rust/Cargo.lock Wed Mar 26 12:01:59 2025 +0100 @@ -1578,12 +1578,6 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] name = "static_assertions_next" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1781,13 +1775,11 @@ [[package]] name = "twox-hash" -version = "1.6.3" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" +checksum = "e7b17f197b3050ba473acf9181f7b1d3b66d1cf7356c6cc57886662276e65908" dependencies = [ - "cfg-if", "rand 0.8.5", - "static_assertions", ] [[package]]
--- a/rust/hg-core/Cargo.toml Wed Mar 26 12:00:38 2025 +0100 +++ b/rust/hg-core/Cargo.toml Wed Mar 26 12:01:59 2025 +0100 @@ -36,7 +36,7 @@ rand_distr = "0.5.1" serde = { version = "1.0", features = ["derive"] } sha-1 = "0.10.0" -twox-hash = "1.6.3" +twox-hash = "2.1.0" same-file = "1.0.6" tempfile = "3.3.0" toml = "0.6"
--- a/rust/hg-core/src/lib.rs Wed Mar 26 12:00:38 2025 +0100 +++ b/rust/hg-core/src/lib.rs Wed Mar 26 12:01:59 2025 +0100 @@ -45,7 +45,7 @@ pub mod utils; pub mod vfs; use std::{collections::HashMap, sync::atomic::AtomicBool}; -use twox_hash::RandomXxHashBuilder64; +use twox_hash::xxhash64::RandomState; /// Used to communicate with threads spawned from code within this crate that /// they should stop their work (SIGINT was received). @@ -56,9 +56,8 @@ /// Rust's default hasher is too slow because it tries to prevent collision /// attacks. We are not concerned about those: if an ill-minded person has /// write access to your repository, you have other issues. -pub type FastHashMap<K, V> = HashMap<K, V, RandomXxHashBuilder64>; +pub type FastHashMap<K, V> = HashMap<K, V, RandomState>; // TODO: should this be the default `FastHashMap` for all of hg-core, not just // dirstate? How does XxHash compare with AHash, hashbrown’s default? -pub type FastHashbrownMap<K, V> = - hashbrown::HashMap<K, V, RandomXxHashBuilder64>; +pub type FastHashbrownMap<K, V> = hashbrown::HashMap<K, V, RandomState>;