Skip to content

Commit 4c894ea

Browse files
committed
Delete unused associated constant from lexical
warning: associated constant `NEGATIVE_INFINITY_BITS` is never used --> src/lexical/num.rs:223:11 | 175 | pub trait Float: Number { | ----- associated constant in this trait ... 223 | const NEGATIVE_INFINITY_BITS: Self::Unsigned; | ^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
1 parent fa8aa22 commit 4c894ea

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/lexical/num.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,6 @@ pub trait Float: Number {
219219

220220
/// Positive infinity as bits.
221221
const INFINITY_BITS: Self::Unsigned;
222-
/// Positive infinity as bits.
223-
const NEGATIVE_INFINITY_BITS: Self::Unsigned;
224222
/// Size of the significand (mantissa) without hidden bit.
225223
const MANTISSA_SIZE: i32;
226224
/// Bias of the exponent
@@ -320,7 +318,6 @@ impl Float for f32 {
320318
const HIDDEN_BIT_MASK: u32 = 0x00800000;
321319
const MANTISSA_MASK: u32 = 0x007FFFFF;
322320
const INFINITY_BITS: u32 = 0x7F800000;
323-
const NEGATIVE_INFINITY_BITS: u32 = Self::INFINITY_BITS | Self::SIGN_MASK;
324321
const MANTISSA_SIZE: i32 = 23;
325322
const EXPONENT_BIAS: i32 = 127 + Self::MANTISSA_SIZE;
326323
const DENORMAL_EXPONENT: i32 = 1 - Self::EXPONENT_BIAS;
@@ -379,7 +376,6 @@ impl Float for f64 {
379376
const HIDDEN_BIT_MASK: u64 = 0x0010000000000000;
380377
const MANTISSA_MASK: u64 = 0x000FFFFFFFFFFFFF;
381378
const INFINITY_BITS: u64 = 0x7FF0000000000000;
382-
const NEGATIVE_INFINITY_BITS: u64 = Self::INFINITY_BITS | Self::SIGN_MASK;
383379
const MANTISSA_SIZE: i32 = 52;
384380
const EXPONENT_BIAS: i32 = 1023 + Self::MANTISSA_SIZE;
385381
const DENORMAL_EXPONENT: i32 = 1 - Self::EXPONENT_BIAS;

0 commit comments

Comments
 (0)