Created
January 11, 2019 18:53
-
-
Save rust-play/236ce9187bc35a817ad5b523907ca9b3 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
const fn true_fn() -> bool { true } | |
fn main() -> Result<(), Box<std::error::Error>> { | |
let num = true; | |
const TRUE: bool = true_fn(); | |
match num { | |
TRUE => println!("Is u64::max_value()"), | |
false => println!("Is boring") | |
} | |
Ok(()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment