From: James Bendig Date: Fri, 10 Feb 2017 18:59:39 +0000 (-0600) Subject: Changed an .any() call with double negatives into a more readable .all(). X-Git-Tag: archive/raspbian/0.35.0-2+rpi1~3^2^2^2^2^2^2^2~22^2~9^2~159^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=492d8a0433ec111d334b7641b012f80317f37983;p=cargo.git Changed an .any() call with double negatives into a more readable .all(). --- diff --git a/src/cargo/ops/cargo_compile.rs b/src/cargo/ops/cargo_compile.rs index 27b861029..fdacc1e44 100644 --- a/src/cargo/ops/cargo_compile.rs +++ b/src/cargo/ops/cargo_compile.rs @@ -435,7 +435,7 @@ fn generate_targets<'a>(pkg: &'a Package, let mut compatible_targets = Vec::with_capacity(targets.len()); for (target, profile) in targets.drain(0..) { if target.is_lib() || match target.required_features() { - Some(f) => !f.iter().any(|f| !features.contains(f)), + Some(f) => f.iter().all(|f| features.contains(f)), None => true, } { compatible_targets.push((target, profile));