Skip to content

Commit 704f030

Browse files
committed
Upgrade to rand 0.7.3
1 parent c4945f2 commit 704f030

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ autocfg = "1"
3030

3131
[dev-dependencies]
3232
lazy_static = "1.2"
33-
rand = "0.5.1"
33+
rand = { version = "0.7.3", features = ["small_rng"] }
3434
rayon = "1.0"
3535
rustc-hash = "1.0"
3636
serde_test = "1.0"

tests/set.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![cfg(not(miri))] // FIXME: takes too long
22

33
use hashbrown::HashSet;
4-
use rand::{distributions::Alphanumeric, Rng, SeedableRng, XorShiftRng};
4+
use rand::{distributions::Alphanumeric, rngs::SmallRng, Rng, SeedableRng};
55

66
#[test]
77
fn test_hashset_insert_remove() {
@@ -12,8 +12,7 @@ fn test_hashset_insert_remove() {
1212
130, 220, 246, 217, 111, 124, 221, 189, 190, 234, 121, 93, 67, 95, 100, 43,
1313
];
1414

15-
let mut rng: XorShiftRng = SeedableRng::from_seed(seed);
16-
//let mut rng: XorShiftRng = XorShiftRng::new_unseeded();
15+
let rng = &mut SmallRng::from_seed(seed);
1716
let tx: Vec<Vec<char>> = (0..4096)
1817
.map(|_| (rng.sample_iter(&Alphanumeric).take(32).collect()))
1918
.collect();

0 commit comments

Comments
 (0)