trpl-zh-cn/listings/ch08-common-collections/listing-08-23/src/main.rs

13 lines
251 B
Rust
Raw Normal View History

2022-02-06 16:43:51 +08:00
fn main() {
// ANCHOR: here
use std::collections::HashMap;
let mut scores = HashMap::new();
scores.insert(String::from("Blue"), 10);
2023-01-16 17:34:52 +08:00
scores.insert(String::from("Blue"), 25);
2022-02-06 16:43:51 +08:00
println!("{scores:?}");
2022-02-06 16:43:51 +08:00
// ANCHOR_END: here
}