Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. fn main() {
  2. use std::collections::HashMap;
  3. let int_vector = vec![1,2,3,4];
  4. let int_hash:HashMap<_,_> = int_vector.iter().zip(vec![0;int_vector.len()]).collect();
  5. println!("{:?}",int_hash);
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement