daily pastebin goal
33%
SHARE
TWEET

Untitled

a guest Dec 15th, 2018 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use std::collections::HashMap;
  2.  
  3. fn main() {
  4.     let mut map = HashMap::new();
  5.     map.insert("key".to_string(), "one".to_string());
  6.    
  7.     let mut x = *(map.get(&"key".to_string()).unwrap().clone());
  8.    
  9.     x = "two".to_string();
  10.     println!("{} {}", x, map.get(&"key".to_string()).unwrap());
  11. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand