]>
git.proxmox.com Git - rustc.git/blob - src/doc/book/listings/ch08-common-collections/listing-08-24/src/main.rs
3 use std
::collections
::HashMap
;
5 let mut scores
= HashMap
::new();
6 scores
.insert(String
::from("Blue"), 10);
8 scores
.entry(String
::from("Yellow")).or_insert(50);
9 scores
.entry(String
::from("Blue")).or_insert(50);
11 println
!("{:?}", scores
);