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");
- // Iterate the hash by key
- for k in hash.keys() {
- println!("{} => {}", k, *hash.get(k).unwrap());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement