Created
June 25, 2018 17:28
-
-
Save glguy/ff4ad6a2ce55ef8cfac5440d1ceb23a0 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 main() { | |
let mut v = vec![false,false,true,false]; | |
for x in &mut v { | |
if *x { break } | |
*x = true; | |
} | |
println!("{:?}", v); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment