1
Fork 0

replaced some unwrap_or with unwrap_or_else

This commit is contained in:
klensy 2021-02-23 23:56:04 +03:00
parent 446d4533e8
commit 5ff1be197e
6 changed files with 11 additions and 11 deletions

View file

@ -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.