simplify impl Termination for Result<Infallible, E>
Co-authored-by: Konrad Borowski <konrad@borowski.pw>
This commit is contained in:
parent
2bdd075513
commit
2433d3788e
@ -2056,8 +2056,7 @@ impl<E: fmt::Debug> Termination for Result<!, E> {
|
||||
impl<E: fmt::Debug> Termination for Result<Infallible, E> {
|
||||
fn report(self) -> i32 {
|
||||
let Err(err) = self;
|
||||
eprintln!("Error: {:?}", err);
|
||||
ExitCode::FAILURE.report()
|
||||
Err::<!, _>(err).report()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user