Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::collections::HashMap;
- fn main() {
- let mut hash = HashMap::new();
- hash.insert("one", "eins");
- hash.insert("two", "zwei");
- hash.insert("three", "drei");
- let data = match hash.get("one") {
- None => "",
- Some(v) => *v
- };
- assert_eq!(data, "eins");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement