Skip to content

Commit

Permalink
Merge pull request #163 from nomyfan/style/immutable
Browse files Browse the repository at this point in the history
style: prefer immutable
  • Loading branch information
sdroege committed Feb 20, 2024
2 parents c330321 + 7ceec77 commit 246ece2
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/lib.rs
Expand Up @@ -847,13 +847,11 @@ 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(|target| target.contains("msvc"))
.unwrap_or(false);

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

0 comments on commit 246ece2

Please sign in to comment.