Created
December 15, 2018 05:52
-
-
Save iopq/6ceec2af9275ca123d9e8e93ae8dc44d to your computer and use it in GitHub Desktop.
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
use failure::Fail; | |
#[derive(Debug, Fail)] | |
#[fail(display = "Hello World")] | |
struct MyError; | |
fn main() { | |
let err: Result<(), MyError> = Err(MyError); | |
println!("{}", err.unwrap_err()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment