diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-03-07 17:31:30 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-03-07 17:31:30 +0100 |
commit | 00aa4df88edae1d5eeb3fb365af05f95bd0de3b4 (patch) | |
tree | 8e5bd3e4aa512fde4da1449ff3a578f084db5953 /lib/core/libimagerror/src/exit.rs | |
parent | 10a7049639136cdcce0fad2209e631a21d00b595 (diff) | |
parent | 587af0ff0590307897a6d8c662c90a6e8b782212 (diff) |
Merge branch 'cleanup-libimagerror'
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'lib/core/libimagerror/src/exit.rs')
-rw-r--r-- | lib/core/libimagerror/src/exit.rs | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/core/libimagerror/src/exit.rs b/lib/core/libimagerror/src/exit.rs index dd3c653b..3df64b2b 100644 --- a/lib/core/libimagerror/src/exit.rs +++ b/lib/core/libimagerror/src/exit.rs @@ -55,13 +55,3 @@ impl Error for ExitCode { } } -pub trait ExitUnwrap<T> { - fn unwrap_or_exit(self) -> T; -} - -impl<T, E: Into<ExitCode>> ExitUnwrap<T> for Result<T, E> { - fn unwrap_or_exit(self) -> T { - self.map_err(Into::into).unwrap_or_else(|e| ::std::process::exit(e.0)) - } -} - |