use std::collections::HashMap; let key = String::from("color"); let value = String::from("blue"); let mut map = HashMap::new(); map.insert(key, value); // println!("{}", key); // 错误:key 已被移动