Created
April 2, 2014 21:35
-
-
Save bvssvni/9943662 to your computer and use it in GitHub Desktop.
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
fn insert_text(text: &mut HashMap<&'static str, &'static str>) { | |
let text: Vec<&'static str> = vec!(include!("text.rs")); | |
for chunk in text.as_slice().chunks(2) { | |
let id: &'static str = *chunk.get(0).unwrap(); | |
let txt: &'static str = *chunk.get(1).unwrap(); | |
text.insert(id, txt); | |
} | |
} | |
src/main.rs:20:21: 20:23 error: mismatched types: expected `uint` but found `&'static str` (expected uint but found &'static str) | |
src/main.rs:20 text.insert(id, txt); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment