remove unnecessary logical not
This commit is contained in:
parent
2e8126af13
commit
07f12b6fb4
@ -172,7 +172,7 @@ impl Display for Number {
|
|||||||
let mut whole = self.val.to_integer().abs();
|
let mut whole = self.val.to_integer().abs();
|
||||||
let has_decimal = !self.val.denom().is_one();
|
let has_decimal = !self.val.denom().is_one();
|
||||||
let mut frac = self.val.fract().abs();
|
let mut frac = self.val.fract().abs();
|
||||||
let mut dec = String::with_capacity(if !has_decimal { 0 } else { PRECISION + 1 });
|
let mut dec = String::with_capacity(if has_decimal { PRECISION + 1 } else { 0 });
|
||||||
if has_decimal {
|
if has_decimal {
|
||||||
for _ in 0..(PRECISION - 1) {
|
for _ in 0..(PRECISION - 1) {
|
||||||
frac *= BigInt::from(10);
|
frac *= BigInt::from(10);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user