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
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)
The text was updated successfully, but these errors were encountered:
This might not even be a regression, but just a problem with assert_eq. Our const folder does not know about references, so &offset == &0 will still get linted about.
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.
The text was updated successfully, but these errors were encountered: