2 use std::collections::HashMap;
4 fn check_strs(actual: &str, expected: &str) -> bool {
5 if actual != expected {
6 println!("Found {}, but expected {}", actual, expected);
13 let mut table = HashMap::new();
14 table.insert("one".to_string(), 1);
15 table.insert("two".to_string(), 2);
16 assert!(check_strs(&format!("{:?}", table), "{\"one\": 1, \"two\": 2}") ||
17 check_strs(&format!("{:?}", table), "{\"two\": 2, \"one\": 1}"));