use polymur_hash::PolymurHasher;
use std::collections::HashMap;
use std::hash::BuildHasherDefault;
type PolymurHashMap<K, V> = HashMap<K, V, BuildHasherDefault<PolymurHasher>>;
fn main() {
let mut scores: PolymurHashMap<String, u32> = PolymurHashMap::default();
scores.insert("Alice".to_string(), 100);
scores.insert("Bob".to_string(), 87);
scores.insert("Charlie".to_string(), 95);
scores.insert("David".to_string(), 78);
println!("Scores:");
for (name, score) in &scores {
println!(" {}: {}", name, score);
}
if let Some(score) = scores.get("Alice") {
println!("\nAlice's score: {}", score);
}
scores.entry("Eve".to_string()).or_insert(92);
println!("\nAfter adding Eve: {} students", scores.len());
}