Created
November 13, 2016 06:57
-
-
Save kracekumar/df1d975acfae9bc2a40ba3732b8b3ccf 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 return_none() -> Option<bool>{ | |
None | |
} | |
fn main(){ | |
println!("{:?}", return_none().unwrap()); | |
} | |
// Output | |
()/home/user/code/snippets/ $ ./rust_options | |
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', ../src/libcore/option.rs:323 | |
note: Run with `RUST_BACKTRACE=1` for a backtrace. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment