diff options
| author | Ibraheem Ahmed <ibrah1440@gmail.com> | 2021-09-03 11:24:25 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-03 11:24:25 -0400 |
| commit | 2433d3788e7b5fe7c095316fa38e462ff8093948 (patch) | |
| tree | c528e76a0fb48fa73e13425def9884bbd3db4b0c | |
| parent | 2bdd0755139cf7183d6c63bda16925d824640f10 (diff) | |
| download | rust-2433d3788e7b5fe7c095316fa38e462ff8093948.tar.gz rust-2433d3788e7b5fe7c095316fa38e462ff8093948.zip | |
simplify `impl Termination for Result<Infallible, E>`
Co-authored-by: Konrad Borowski <konrad@borowski.pw>
| -rw-r--r-- | library/std/src/process.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/library/std/src/process.rs b/library/std/src/process.rs index d94b6896751..4f67cd88652 100644 --- a/library/std/src/process.rs +++ b/library/std/src/process.rs @@ -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() } } |
