All issues
Anti-pattern
Bug risk
Coverage
Documentation
Performance
Secrets
Security
Style
Type check
NaN
Comparing a floating point with NaN using == or != is redundant. NaN cannot be compared to anything, not even itself. Use .is_nan() instead.
==
!=
.is_nan()
if x != f32::NAN { // ... }
if !x.is_nan() { // ... }