summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/back
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-02-26 15:52:31 +0100
committerGitHub <noreply@github.com>2021-02-26 15:52:31 +0100
commit039b1b62acc736080d3ecf86c249f00356ac91a0 (patch)
tree06a59887bed652640e0c2294ab8f0287038203c5 /compiler/rustc_codegen_ssa/src/back
parenta56bbb134fe98931de92b587c3b98920f6923bc9 (diff)
parent08b1e8004b06112fb8334155b2cea314bd3e8161 (diff)
downloadrust-039b1b62acc736080d3ecf86c249f00356ac91a0.tar.gz
rust-039b1b62acc736080d3ecf86c249f00356ac91a0.zip
Rollup merge of #82456 - klensy:or-else, r=estebank
Replaced some unwrap_or and map_or with lazy variants

Replaced some `unwrap_or` and `map_or` with `unwrap_or_else` and `map_or_else`.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/link.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index 08932e26bf1..caa6a6a8e3a 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -2082,7 +2082,7 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>(
         let filestem = cratepath.file_stem().unwrap().to_str().unwrap();
         cmd.link_rust_dylib(
             Symbol::intern(&unlib(&sess.target, filestem)),
-            parent.unwrap_or(Path::new("")),
+            parent.unwrap_or_else(|| Path::new("")),
         );
     }
 }