You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let error_margin = f64::EPSILON;// Use an epsilon for comparison// Or, if Rust <= 1.42, use `std::f64::EPSILON` constant instead.// let error_margin = std::f64::EPSILON;if(y - 1.23f64).abs() < error_margin {}if(y - x).abs() > error_margin {}
float-cmp
crate is used in one place in Hurl to check the comparison between twof64
hurl/packages/hurl/src/jsonpath/eval/selector.rs
Line 157 in 07512a9
We can do a "classic" float comparison as clippy suggests https://rust-lang.github.io/rust-clippy/rust-1.72.0/index.html#/float_cmp and remove
float-cmp
fromNote: we compare
f64
for predicate value herehurl/packages/hurl/src/runner/number.rs
Lines 32 to 40 in 07512a9
so there is no reason to use
float-cmp
in jsonpath moduleThe text was updated successfully, but these errors were encountered: