fn update_hash_maps_v2() {
    let mut scores = HashMap::new();
    scores.insert(String::from("Blue"), 10);

    scores.entry(String::from("Yellow")).or_insert(50);
    scores.entry(String::from("Blue")).or_insert(50);

    println!("{:?}", scores);
}
// Only insert a value if the key has no value
Only insert a value if the key has no value
Only insert a value if the key has no value
fn update_hash_maps_v2() {
    let mut scores = HashMap::new();
    scores.insert(String::from("Blue"), 10);
    scores.entry(String::from("Yellow")).or_insert(50);
    scores.entry(String::from("Blue")).or_insert(50);
    println!("{:?}", scores);
}
fn update_hash_maps_v2 ( ) { let mut scores = HashMap :: new ( ) ; scores . insert ( String :: from ( " " ) , 10 ) ; scores . entry ( String :: from ( " " ) ) . or_insert ( 50 ) ; scores . entry ( String :: from ( " " ) ) . or_insert ( 50 ) ; println ! ( " " scores ) ; }
Only insert a value if the key has no value
Only insert a value if the key has no value