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

@ -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("")),
);
}
}