Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- use std::collections::HashMap;
- let int_vector = vec![1,2,3,4];
- let int_hash:HashMap<_,_> = int_vector.iter().zip(vec![0;int_vector.len()]).collect();
- println!("{:?}",int_hash);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement