diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-03-06 13:48:25 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-03-06 13:48:25 +0100 |
commit | 2efb030c3d543b19cc358d47205c11123933a180 (patch) | |
tree | 185631f9ecb1af71ea249703a697e9d965a0e7bd | |
parent | d59b50ccc97d3652f190a76b7b138643b55f664a (diff) |
Remove unused ExitUnwrap trait
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-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)) - } -} - |