diff --git a/build.rs b/build.rs index 312481570bc..407545c869c 100644 --- a/build.rs +++ b/build.rs @@ -31,7 +31,7 @@ fn main() { // Set linker options specific to Windows MSVC. let target_os = env::var("CARGO_CFG_TARGET_OS"); let target_env = env::var("CARGO_CFG_TARGET_ENV"); - if target_os.as_deref() != Ok("windows") && target_env.as_deref() != Ok("msvc") { + if !(target_os.as_deref() == Ok("windows") && target_env.as_deref() == Ok("msvc")) { return; }