From 7f09e61c31ffffc340495eca23e834d6159f61d6 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 13 May 2019 11:45:39 +0200 Subject: [PATCH] make HashMap test a bit nicer --- tests/run-pass/hashmap.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/run-pass/hashmap.rs b/tests/run-pass/hashmap.rs index 55037f55bf0..e249238d48c 100644 --- a/tests/run-pass/hashmap.rs +++ b/tests/run-pass/hashmap.rs @@ -24,12 +24,10 @@ fn test_map(mut map: HashMap) { } fn main() { - if cfg!(target_os = "macos") { // TODO: Implement random number generation on OS X. + if cfg!(target_os = "macos") { // TODO: Implement libstd HashMap seeding for macOS (https://github.com/rust-lang/miri/issues/686). // Until then, use a deterministic map. - let map : HashMap> = HashMap::default(); - test_map(map); + test_map::>(HashMap::default()); } else { - let map: HashMap = HashMap::default(); - test_map(map); + test_map(HashMap::new()); } } -- 2.44.0