Skip to content

Commit

Permalink
style: prefer immutable
Browse files Browse the repository at this point in the history
  • Loading branch information
nomyfan committed Feb 20, 2024
1 parent c330321 commit d0256ec
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/lib.rs
Expand Up @@ -847,13 +847,10 @@ impl Library {
}

fn parse_libs_cflags(&mut self, name: &str, output: &[u8], config: &Config) {
let mut is_msvc = false;
let target = env::var("TARGET");
if let Ok(target) = &target {
if target.contains("msvc") {
is_msvc = true;
}
}
let is_msvc = target
.as_ref()
.map_or(false, |target| target.contains("msvc"));

let system_roots = if cfg!(target_os = "macos") {
vec![PathBuf::from("/Library"), PathBuf::from("/System")]
Expand Down

0 comments on commit d0256ec

Please sign in to comment.