diff --git a/Cargo.lock b/Cargo.lock index 24a53fe8db4..bdc5823e44f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4075,6 +4075,7 @@ dependencies = [ "rand 0.9.2", "rand_chacha 0.9.0", "rand_core 0.9.5", + "rustc-hash", "sha3", "uucore", ] diff --git a/src/uu/shuf/Cargo.toml b/src/uu/shuf/Cargo.toml index b271d9b9b57..cd2c5007267 100644 --- a/src/uu/shuf/Cargo.toml +++ b/src/uu/shuf/Cargo.toml @@ -26,6 +26,7 @@ rand_core = { workspace = true } sha3 = { workspace = true } uucore = { workspace = true } fluent = { workspace = true } +rustc-hash = "2.1.1" [[bin]] name = "shuf" diff --git a/src/uu/shuf/src/nonrepeating_iterator.rs b/src/uu/shuf/src/nonrepeating_iterator.rs index d05844ba9d1..b74103394f7 100644 --- a/src/uu/shuf/src/nonrepeating_iterator.rs +++ b/src/uu/shuf/src/nonrepeating_iterator.rs @@ -1,4 +1,6 @@ -use std::collections::HashMap; +// hijack HashMap for performance +type HashMap = std::collections::HashMap; + use std::ops::RangeInclusive; use uucore::error::UResult;