simplify impl Termination for Result<Infallible, E>
Co-authored-by: Konrad Borowski <konrad@borowski.pw>
This commit is contained in:
parent
2bdd075513
commit
2433d3788e
1 changed files with 1 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue