rust programming snippet
let mut hm = HashMap::new(); hm.insert(String::from("kalimera"), 1); hm.insert(String::from("kalinuxta"), 2); hm.insert(String::from("Kalispera"), 3); println!("hm: {:#?}", hm);
/// I need to call Use first, not included in the Prelude use std::collections::HashMap; 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();