File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -12,19 +12,11 @@ use std::path::{Path, PathBuf};
12
12
mod cargo;
13
13
14
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
- }
15
+ option_env ! ( "HOST_LIBS" ) . map_or ( cargo:: CARGO_TARGET_DIR . join ( env ! ( "PROFILE" ) ) , PathBuf :: from)
20
16
}
21
17
22
18
fn clippy_driver_path ( ) -> PathBuf {
23
- if let Some ( path) = option_env ! ( "CLIPPY_DRIVER_PATH" ) {
24
- PathBuf :: from ( path)
25
- } else {
26
- cargo:: TARGET_LIB . join ( "clippy-driver" )
27
- }
19
+ option_env ! ( "CLIPPY_DRIVER_PATH" ) . map_or ( cargo:: TARGET_LIB . join ( "clippy-driver" ) , PathBuf :: from)
28
20
}
29
21
30
22
// When we'll want to use `extern crate ..` for a dependency that is used
You can’t perform that action at this time.
0 commit comments