-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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` from ```rust 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 { } ``` Note: we compare `f64` for predicate value here https://github.com/Orange-OpenSource/hurl/blob/07512a9cbfbba17cd16df3706f3a0c5c98b67d3d/packages/hurl/src/runner/number.rs#L32-L40 so there is no reason to use `float-cmp` in jsonpath module
- Loading branch information
Showing
4 changed files
with
3 additions
and
18 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters