diff --git a/src/lib.rs b/src/lib.rs index 532eb6fc..7ae5be2f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -170,7 +170,7 @@ )] // Clippy lints. #![cfg_attr( - feature = "cargo-clippy", + clippy, warn( clippy::must_use_candidate, clippy::return_self_not_must_use, @@ -185,7 +185,7 @@ // Lints allowed in tests because they are unavoidable in the generic code when a type may or may // not need to be dereferenced or cloned. #![cfg_attr( - all(feature = "cargo-clippy", test), + all(clippy, test), allow(clippy::op_ref, clippy::clone_on_copy, clippy::float_cmp) )] diff --git a/src/system.rs b/src/system.rs index 2a0e0c2a..b90e3b25 100644 --- a/src/system.rs +++ b/src/system.rs @@ -679,7 +679,7 @@ macro_rules! system { /// Returns `true` if `self`'s sign bit is positive, including `+0.0` and /// `INFINITY`. - #[cfg_attr(feature = "cargo-clippy", allow(clippy::wrong_self_convention))] + #[cfg_attr(clippy, allow(clippy::wrong_self_convention))] #[must_use = "method returns a new number and does not mutate the original value"] #[inline(always)] pub fn is_sign_positive(self) -> bool @@ -691,7 +691,7 @@ macro_rules! system { /// Returns `true` if `self`'s sign is negative, including `-0.0` and /// `NEG_INFINITY`. - #[cfg_attr(feature = "cargo-clippy", allow(clippy::wrong_self_convention))] + #[cfg_attr(clippy, allow(clippy::wrong_self_convention))] #[must_use = "method returns a new number and does not mutate the original value"] #[inline(always)] pub fn is_sign_negative(self) -> bool @@ -771,7 +771,7 @@ macro_rules! system { U: Units + ?Sized, { /// Returns `true` if this value is `NAN` and `false` otherwise. - #[cfg_attr(feature = "cargo-clippy", allow(clippy::wrong_self_convention))] + #[cfg_attr(clippy, allow(clippy::wrong_self_convention))] #[must_use = "method returns a new number and does not mutate the original value"] #[inline(always)] pub fn is_nan(self) -> bool @@ -781,7 +781,7 @@ macro_rules! system { /// Returns `true` if this value is positive infinity or negative infinity and /// `false` otherwise. - #[cfg_attr(feature = "cargo-clippy", allow(clippy::wrong_self_convention))] + #[cfg_attr(clippy, allow(clippy::wrong_self_convention))] #[must_use = "method returns a new number and does not mutate the original value"] #[inline(always)] pub fn is_infinite(self) -> bool @@ -790,7 +790,7 @@ macro_rules! system { } /// Returns `true` if this number is neither infinite nor `NAN`. - #[cfg_attr(feature = "cargo-clippy", allow(clippy::wrong_self_convention))] + #[cfg_attr(clippy, allow(clippy::wrong_self_convention))] #[must_use = "method returns a new number and does not mutate the original value"] #[inline(always)] pub fn is_finite(self) -> bool @@ -799,7 +799,7 @@ macro_rules! system { } /// Returns `true` if the number is neither zero, infinite, subnormal, or `NAN`. - #[cfg_attr(feature = "cargo-clippy", allow(clippy::wrong_self_convention))] + #[cfg_attr(clippy, allow(clippy::wrong_self_convention))] #[must_use = "method returns a new number and does not mutate the original value"] #[inline(always)] pub fn is_normal(self) -> bool