Skip to content

Commit 7f09e61

Browse files
committed
make HashMap test a bit nicer
1 parent be47fae commit 7f09e61

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/run-pass/hashmap.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,10 @@ 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.
27+
if cfg!(target_os = "macos") { // TODO: Implement libstd HashMap seeding for macOS (https://github.com/rust-lang/miri/issues/686).
2828
// Until then, use a deterministic map.
29-
let map : HashMap<i32, i32, BuildHasherDefault<collections::hash_map::DefaultHasher>> = HashMap::default();
30-
test_map(map);
29+
test_map::<BuildHasherDefault<collections::hash_map::DefaultHasher>>(HashMap::default());
3130
} else {
32-
let map: HashMap<i32, i32> = HashMap::default();
33-
test_map(map);
31+
test_map(HashMap::new());
3432
}
3533
}

0 commit comments

Comments
 (0)