diff options
| author | klensy <klensy@users.noreply.github.com> | 2021-02-23 23:56:04 +0300 |
|---|---|---|
| committer | klensy <klensy@users.noreply.github.com> | 2021-02-23 23:56:04 +0300 |
| commit | 5ff1be197eaa8a014718b26b1fcbe0ced33b6e1a (patch) | |
| tree | 697e81ac40c38223d77eb7128a6a460166748137 /compiler/rustc_session/src | |
| parent | 446d4533e89db04f9568be4199e56b5fce0d176d (diff) | |
| download | rust-5ff1be197eaa8a014718b26b1fcbe0ced33b6e1a.tar.gz rust-5ff1be197eaa8a014718b26b1fcbe0ced33b6e1a.zip | |
replaced some unwrap_or with unwrap_or_else
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/filesearch.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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. |
