Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::collections::HashMap;
- use std::sync::Arc;
- #[derive(PartialEq, Eq, Hash, Debug)]
- struct V {}
- fn main() {
- let v1 = V {};
- let v2 = V {};
- let mut collect = HashMap::<&V, usize>::new();
- collect.insert(&v1, 15);
- collect.insert(&v2, 42);
- println!("{:?}", collect.get(&v1));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement