From 229d1999944624abdfa96ab77686175c6d685a1c Mon Sep 17 00:00:00 2001 From: klensy Date: Fri, 26 Mar 2021 22:32:37 +0300 Subject: lazily calls some fns --- library/test/src/helpers/exit_code.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'library/test/src/helpers') 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 { - 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)] -- cgit 1.4.1-3-g733a5