Skip to content

Commit

Permalink
Correct cargo-clippy/clippy feature usage for --check-cfg.
Browse files Browse the repository at this point in the history
  • Loading branch information
iliekturtles committed Aug 29, 2024
1 parent 428dcda commit cb2dadf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
)]
// Clippy lints.
#![cfg_attr(
feature = "cargo-clippy",
clippy,
warn(
clippy::must_use_candidate,
clippy::return_self_not_must_use,
Expand All @@ -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)
)]

Expand Down
12 changes: 6 additions & 6 deletions src/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -771,7 +771,7 @@ macro_rules! system {
U: Units<V> + ?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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit cb2dadf

Please sign in to comment.