Last active
November 6, 2018 11:52
-
-
Save pimeys/c491a3b7c3b6d5e3258d82bb358760ab to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::collections::HashMap; | |
fn main() { | |
let mut map = HashMap::new(); | |
map.insert("foo", "bar"); | |
match map.get("foo") { | |
Some(_) => { | |
map.insert("foo", "baz"); // BOOM | |
}, | |
_ => println!("Nothing here") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment