Created
October 15, 2018 10:45
-
-
Save rust-play/5f1900ce76571f3ed36d4b24583ad02a to your computer and use it in GitHub Desktop.
Code shared from the 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
enum Result { | |
PeopleNotice, | |
Others, | |
} | |
fn fuck_the_users(n: i32) -> Result { | |
if n > 2 { | |
Result::PeopleNotice | |
}else { | |
Result::Others | |
} | |
} | |
fn main() { | |
let mut hardness = 0; | |
loop { | |
let result = fuck_the_users(hardness); | |
match result { | |
PeopleNotice => {println!("Sorry"); break;}, | |
_ => {hardness += 1}, | |
} | |
if hardness > 2 { break; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment