From 3e317be72a375435d0513db70bd460f92f38d9ea Mon Sep 17 00:00:00 2001 From: DrunkRandomWalker Date: Wed, 20 Sep 2023 16:32:12 -0400 Subject: [PATCH] fixed lint --- packages/injective-math/src/fp_decimal/exp.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/injective-math/src/fp_decimal/exp.rs b/packages/injective-math/src/fp_decimal/exp.rs index 42658b28..07e069bb 100644 --- a/packages/injective-math/src/fp_decimal/exp.rs +++ b/packages/injective-math/src/fp_decimal/exp.rs @@ -399,7 +399,7 @@ impl FPDecimal { Ordering::Less => { // taylor expansion approximation of exponentation compuation with float number exponent // NOTE: only accurate for 1,3,5,7,11, and combinations of these numbers - if let Some(_) = a.log2() { + if a.log2().is_some() { if ((FPDecimal::reciprocal(b) % FPDecimal::TWO).int() - FPDecimal::ONE).abs() <= FPDecimal::must_from_str("0.000001") { let mut tmp_b = FPDecimal::reciprocal(b).int(); @@ -419,7 +419,7 @@ impl FPDecimal { }; } - if let Some(_) = a.log3() { + if a.log3().is_some() { if ((FPDecimal::reciprocal(b) % FPDecimal::TWO).int() - FPDecimal::ONE).abs() <= FPDecimal::must_from_str("0.000001") { let mut tmp_b = FPDecimal::reciprocal(b).int(); @@ -439,7 +439,7 @@ impl FPDecimal { }; } - if let Some(_) = a.log5() { + if a.log5().is_some() { if ((FPDecimal::reciprocal(b) % FPDecimal::TWO).int() - FPDecimal::ONE).abs() <= FPDecimal::must_from_str("0.000001") { let mut tmp_b = FPDecimal::reciprocal(b).int(); @@ -459,7 +459,7 @@ impl FPDecimal { }; } - if let Some(_) = a.log7() { + if a.log7().is_some() { if ((FPDecimal::reciprocal(b) % FPDecimal::TWO).int() - FPDecimal::ONE).abs() <= FPDecimal::must_from_str("0.000001") { let mut tmp_b = FPDecimal::reciprocal(b).int(); @@ -479,7 +479,7 @@ impl FPDecimal { }; } - if let Some(_) = a.log11() { + if a.log11().is_some() { if ((FPDecimal::reciprocal(b) % FPDecimal::TWO).int() - FPDecimal::ONE).abs() <= FPDecimal::must_from_str("0.000001") { let mut tmp_b = FPDecimal::reciprocal(b).int();