Guest User

Untitled

a guest
Aug 22nd, 2019
77
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use std::collections::HashMap;
  2.  
  3. fn main() {
  4. let mut map = HashMap::new();
  5.  
  6. map.insert("a", 1);
  7. map.insert("b", 2);
  8. map.insert("c", 3);
  9.  
  10. for val in map.values_mut() {
  11. *val += 10;
  12. }
  13.  
  14. for (key, val) in map {
  15. println!("{} {}", key, val);
  16. }
  17. }
RAW Paste Data