Skip to content

Commit

Permalink
chore: merge match arm
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyboyQCD committed Jul 19, 2024
1 parent ff78971 commit 6882a55
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/engine/src/value/operations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,9 @@ impl JsValue {
),
Self::String(ref str) => Self::new(-str.to_number()),
Self::Rational(num) => Self::new(-num),
Self::Integer(0) => Self::new(-f64::from(0)),
Self::Integer(0) | Self::Boolean(false) | Self::Null => Self::new(-f64::from(0)),
Self::Integer(num) => Self::new(-num),
Self::Boolean(true) => Self::new(-f64::from(1)),
Self::Boolean(false) | Self::Null => Self::new(-f64::from(0)),
Self::BigInt(ref x) => Self::new(JsBigInt::neg(x)),
})
}
Expand Down

0 comments on commit 6882a55

Please sign in to comment.