Skip to content

Commit c7a346e

Browse files
authored
Rollup merge of rust-lang#97170 - benediktwerner:master, r=JohnTitor
Remove unnecessay .report() on ExitCode Since rust-lang#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).
2 parents 3a0396b + d35e520 commit c7a346e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

std/src/process.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2136,7 +2136,7 @@ pub trait Termination {
21362136
impl Termination for () {
21372137
#[inline]
21382138
fn report(self) -> ExitCode {
2139-
ExitCode::SUCCESS.report()
2139+
ExitCode::SUCCESS
21402140
}
21412141
}
21422142

@@ -2162,7 +2162,7 @@ impl<E: fmt::Debug> Termination for Result<!, E> {
21622162
fn report(self) -> ExitCode {
21632163
let Err(err) = self;
21642164
eprintln!("Error: {err:?}");
2165-
ExitCode::FAILURE.report()
2165+
ExitCode::FAILURE
21662166
}
21672167
}
21682168

0 commit comments

Comments
 (0)