diff options
author | rabite <rabite@posteo.de> | 2019-03-03 00:24:21 +0100 |
---|---|---|
committer | rabite <rabite@posteo.de> | 2019-03-03 00:24:21 +0100 |
commit | 86250206c32dc55ca5be44b528028323d2227e9c (patch) | |
tree | 88bb274153e67aa2e830b217430d8eb714d1df36 /src/fail.rs | |
parent | eb5a86b7cd37dc39d20f6ce122f671f94f51b75a (diff) |
replaced manual write!s
Diffstat (limited to 'src/fail.rs')
-rw-r--r-- | src/fail.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/fail.rs b/src/fail.rs index 1c0575b..a6f8abe 100644 --- a/src/fail.rs +++ b/src/fail.rs @@ -44,6 +44,14 @@ pub enum HError { NoWidgetCoreError(Backtrace), #[fail(display = "No header for widget")] NoHeaderError, + #[fail(display = "You wanted this!")] + Quit +} + +impl HError { + pub fn quit() -> HResult<()> { + Err(HError::Quit) + } } pub trait ErrorLog where Self: Sized { |