Created
July 6, 2016 20:35
-
-
Save anonymous/d082c5d632ab0249fe1fa917c76f7178 to your computer and use it in GitHub Desktop.
Shared via Rust Playground
This file contains 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 port = "1025"; | |
// Works if I reverse these two lines | |
let mut data = HashMap::new(); | |
let port = port.to_string(); | |
data.insert("port", &port); | |
println!("{:?}", data); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment