Skip to content

Commit

Permalink
Clippies
Browse files Browse the repository at this point in the history
  • Loading branch information
hansl committed Dec 26, 2024
1 parent 345cd69 commit 710d8f1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/engine/src/value/inner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ fn integer() {
}

#[test]
#[allow(clippy::float_cmp)]
fn float() {
fn assert_float(f: f64) {
let v = InnerValue::float64(f);
Expand All @@ -805,11 +806,11 @@ fn float() {
// Some edge cases around zeroes.
let neg_zero = InnerValue::float64(-0.0);
assert!(neg_zero.as_float64().unwrap().is_sign_negative());
assert_eq!(neg_zero.as_float64().unwrap(), 0.0);
assert_eq!(0.0f64, neg_zero.as_float64().unwrap());

let pos_zero = InnerValue::float64(0.0);
assert!(!pos_zero.as_float64().unwrap().is_sign_negative());
assert_eq!(pos_zero.as_float64().unwrap(), 0.0);
assert_eq!(0.0f64, pos_zero.as_float64().unwrap());

assert_eq!(pos_zero.as_float64(), neg_zero.as_float64());

Expand Down

0 comments on commit 710d8f1

Please sign in to comment.