We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c330321 commit d0256ecCopy full SHA for d0256ec
src/lib.rs
@@ -847,13 +847,10 @@ 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_or(false, |target| target.contains("msvc"));
857
858
let system_roots = if cfg!(target_os = "macos") {
859
vec![PathBuf::from("/Library"), PathBuf::from("/System")]
0 commit comments