Merge pull request #4687 from alexcrichton/hashmap-speedup

Use task local random when initializing LinearMap
This commit is contained in:
Tim Chevalier 2013-01-30 14:48:49 -08:00
commit 77f2aac389

View File

@ -62,7 +62,7 @@ pub mod linear {
pub fn linear_map_with_capacity<K: Eq Hash, V>(
initial_capacity: uint) -> LinearMap<K, V> {
let r = rand::Rng();
let r = rand::task_rng();
linear_map_with_capacity_and_keys(r.gen_u64(), r.gen_u64(),
initial_capacity)
}