From 5ff1be197eaa8a014718b26b1fcbe0ced33b6e1a Mon Sep 17 00:00:00 2001 From: klensy Date: Tue, 23 Feb 2021 23:56:04 +0300 Subject: replaced some unwrap_or with unwrap_or_else --- compiler/rustc_session/src/filesearch.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_session/src') diff --git a/compiler/rustc_session/src/filesearch.rs b/compiler/rustc_session/src/filesearch.rs index 47f14fa6b7a..72daf666c99 100644 --- a/compiler/rustc_session/src/filesearch.rs +++ b/compiler/rustc_session/src/filesearch.rs @@ -169,7 +169,7 @@ pub fn get_or_default_sysroot() -> PathBuf { // Check if sysroot is found using env::args().next(), and if is not found, // use env::current_exe() to imply sysroot. - from_env_args_next().unwrap_or(from_current_exe()) + from_env_args_next().unwrap_or_else(|| from_current_exe()) } // The name of the directory rustc expects libraries to be located. -- cgit 1.4.1-3-g733a5