We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e020e17 commit d9fe3b0Copy full SHA for d9fe3b0
tests/compile-test.rs
@@ -12,19 +12,11 @@ use std::path::{Path, PathBuf};
12
mod cargo;
13
14
fn host_lib() -> PathBuf {
15
- if let Some(path) = option_env!("HOST_LIBS") {
16
- PathBuf::from(path)
17
- } else {
18
- cargo::CARGO_TARGET_DIR.join(env!("PROFILE"))
19
- }
+ option_env!("HOST_LIBS").map_or(cargo::CARGO_TARGET_DIR.join(env!("PROFILE")), PathBuf::from)
20
}
21
22
fn clippy_driver_path() -> PathBuf {
23
- if let Some(path) = option_env!("CLIPPY_DRIVER_PATH") {
24
25
26
- cargo::TARGET_LIB.join("clippy-driver")
27
+ option_env!("CLIPPY_DRIVER_PATH").map_or(cargo::TARGET_LIB.join("clippy-driver"), PathBuf::from)
28
29
30
// When we'll want to use `extern crate ..` for a dependency that is used
0 commit comments