mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-05-01 10:49:12 +08:00
15 lines
305 B
Rust
Executable File
15 lines
305 B
Rust
Executable File
fn main() {
|
|
// ANCHOR: here
|
|
use std::collections::HashMap;
|
|
|
|
let mut scores = HashMap::new();
|
|
|
|
scores.insert(String::from("Blue"), 10);
|
|
scores.insert(String::from("Yellow"), 50);
|
|
|
|
for (key, value) in &scores {
|
|
println!("{}: {}", key, value);
|
|
}
|
|
// ANCHOR_END: here
|
|
}
|