严谨!
fn main() {
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);
}
}
转载于:https://www.cnblogs.com/aguncn/p/11405470.html
相关资源:JAVA上百实例源码以及开源项目
转载请注明原文地址: https://mac.8miu.com/read-72960.html