Skip to content

Commit b7685ea

Browse files
committed
macOS now uses SecRandomCopyBytes for us
1 parent 053aa69 commit b7685ea

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7c71bc3208031b1307573de45a3b3e18fa45787a
1+
758dc9af504e2fe75813bd362619231ecc727898

tests/run-pass/hashmap.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// compile-flags: -Zmiri-seed=0000000000000000
22

3-
use std::collections::{self, HashMap};
4-
use std::hash::{BuildHasherDefault, BuildHasher};
3+
use std::collections::HashMap;
4+
use std::hash::BuildHasher;
55

66
fn test_map<S: BuildHasher>(mut map: HashMap<i32, i32, S>) {
77
map.insert(0, 0);
@@ -24,12 +24,5 @@ fn test_map<S: BuildHasher>(mut map: HashMap<i32, i32, S>) {
2424
}
2525

2626
fn main() {
27-
if cfg!(target_os = "macos") { // TODO: Implement random number generation on OS X.
28-
// Until then, use a deterministic map.
29-
let map : HashMap<i32, i32, BuildHasherDefault<collections::hash_map::DefaultHasher>> = HashMap::default();
30-
test_map(map);
31-
} else {
32-
let map: HashMap<i32, i32> = HashMap::default();
33-
test_map(map);
34-
}
27+
test_map(HashMap::new());
3528
}

0 commit comments

Comments
 (0)