Guest User

Untitled

a guest
Dec 17th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. use std::collections::HashMap;
  2.  
  3. fn main() {
  4. let x: HashMap<&str, i32> = [
  5. ("one", 1),
  6. ("two", 2)
  7. ].iter().cloned().collect();
  8.  
  9. println!("{:?}", x);
  10. }
Add Comment
Please, Sign In to add comment