Open
Description
cargo clippy -V
: clippy 0.0.212 (d61b254 2019-02-19)
Clippy should allow float comparison with zero. The current behavior seems to be a regression as this has apparently already been reported and fixed in #165/#1142.
error: strict comparison of f32 or f64
--> tests/test_datetime.rs:125:5
|
125 | assert_eq!(offset, 0f32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: #[deny(clippy::float_cmp)] on by default
note: std::f32::EPSILON and std::f64::EPSILON are available.
--> tests/test_datetime.rs:125:5
|
125 | assert_eq!(offset, 0f32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)