We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c330321 + 7ceec77 commit 246ece2Copy full SHA for 246ece2
src/lib.rs
@@ -847,13 +847,11 @@ impl Library {
847
}
848
849
fn parse_libs_cflags(&mut self, name: &str, output: &[u8], config: &Config) {
850
- let mut is_msvc = false;
851
let target = env::var("TARGET");
852
- if let Ok(target) = &target {
853
- if target.contains("msvc") {
854
- is_msvc = true;
855
- }
856
+ let is_msvc = target
+ .as_ref()
+ .map(|target| target.contains("msvc"))
+ .unwrap_or(false);
857
858
let system_roots = if cfg!(target_os = "macos") {
859
vec![PathBuf::from("/Library"), PathBuf::from("/System")]
0 commit comments