Created
May 29, 2016 21:14
-
-
Save anonymous/8d880aa6c6b674caef1dfe275a9f1f05 to your computer and use it in GitHub Desktop.
Shared via Rust Playground
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
fn main() { | |
let list = vec![0, 1, 2, 3, 4, 5]; | |
let index = 3; | |
if true { | |
println!("the magic number is {}", list[index]); | |
} else { | |
let other_index = 5; | |
println!("the index is {}", other_index); | |
println!("the magic number is {}", list[index]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment