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};
1212mod cargo;
1313
1414fn 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)
2016}
2117
2218fn 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)
2820}
2921
3022// 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