Skip to content

Commit

Permalink
Remove unnecessay .report() on ExitCode
Browse files Browse the repository at this point in the history
  • Loading branch information
benediktwerner committed May 19, 2022
1 parent 50872bd commit 7013dc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/std/src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2136,7 +2136,7 @@ pub trait Termination {
impl Termination for () {
#[inline]
fn report(self) -> ExitCode {
ExitCode::SUCCESS.report()
ExitCode::SUCCESS
}
}

Expand All @@ -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
}
}

Expand Down

0 comments on commit 7013dc5

Please sign in to comment.