Rollup merge of #97170 - benediktwerner:master, r=JohnTitor

Remove unnecessay .report() on ExitCode

Since #93442, the return type is `ExitCode` anyway so there's no need to do a conversion using `.report()` (which is now just a no-op).
This commit is contained in:
Dylan DPC 2022-05-19 17:22:51 +02:00 committed by GitHub
commit 175974743a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2136,7 +2136,7 @@ pub trait Termination {
impl Termination for () {
#[inline]
fn report(self) -> ExitCode {
ExitCode::SUCCESS.report()
ExitCode::SUCCESS
}
}
@ -2162,7 +2162,7 @@ impl<E: fmt::Debug> Termination for Result<!, E> {
fn report(self) -> ExitCode {
let Err(err) = self;
eprintln!("Error: {err:?}");
ExitCode::FAILURE.report()
ExitCode::FAILURE
}
}