diff options
Diffstat (limited to 'library/test/src/helpers/exit_code.rs')
| -rw-r--r-- | library/test/src/helpers/exit_code.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/test/src/helpers/exit_code.rs b/library/test/src/helpers/exit_code.rs index 31e234d9818..50bb260762a 100644 --- a/library/test/src/helpers/exit_code.rs +++ b/library/test/src/helpers/exit_code.rs @@ -4,7 +4,7 @@ use std::process::ExitStatus; #[cfg(not(unix))] pub fn get_exit_code(status: ExitStatus) -> Result<i32, String> { - status.code().ok_or("received no exit code from child process".into()) + status.code().ok_or_else(|| "received no exit code from child process".into()) } #[cfg(unix)] |
