use std::collections::HashMap;
pub fn test_hash_map() {
let mut scores = HashMap::new();
scores.insert(String::from("Blue"), 10);
scores.insert(String::from("Yellow"), 50);
scores.entry(String::from("Blue")).or_insert(30);
let teams = vec![String::from("Blue"), String::from("Yellow")];
let initial_scores = vec![10, 50];
let scores: HashMap<_, _> = teams.iter().zip(initial_scores.iter()).collect();
println!("map={:?}",scores);
test_cus_hash_map();
}
fn test_cus_hash_map(){
let mut mapCus:HashMap<i32,i32>=HashMap::new();
mapCus.insert(1,2);
mapCus.insert(2,2);
println!("{:?}",mapCus);
}