Skip to content

Instantly share code, notes, and snippets.

@iopq
Created December 15, 2018 05:52
Show Gist options
  • Save iopq/6ceec2af9275ca123d9e8e93ae8dc44d to your computer and use it in GitHub Desktop.
Save iopq/6ceec2af9275ca123d9e8e93ae8dc44d to your computer and use it in GitHub Desktop.
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