mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-22 15:42:20 +03:00
d5f1b3eb3f
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 07512a9cbf/packages/hurl/src/runner/number.rs (L32-L40)
so there is no reason to use `float-cmp` in jsonpath module
19 lines
492 B
TOML
19 lines
492 B
TOML
[package]
|
|
name = "hurl_core"
|
|
version = "6.0.0-SNAPSHOT"
|
|
authors = ["Fabrice Reix <fabrice.reix@orange.com>", "Jean-Christophe Amiel <jeanchristophe.amiel@orange.com>", "Filipe Pinto <filipe.pinto@orange.com>"]
|
|
edition = "2021"
|
|
license = "Apache-2.0"
|
|
description = "Hurl Core"
|
|
documentation = "https://hurl.dev"
|
|
homepage = "https://hurl.dev"
|
|
repository = "https://github.com/Orange-OpenSource/hurl"
|
|
|
|
[dependencies]
|
|
colored = "2.1.0"
|
|
libxml = "0.3.3"
|
|
regex = "1.11.1"
|
|
|
|
[lints]
|
|
workspace = true
|