Skip to content

Commit ab2d157

Browse files
authored
Merge pull request #1742 from Manishearth/future_compat
Fix a future compat lint that we triggered
2 parents 3b3e47f + 5997fb9 commit ab2d157

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/zero_div_zero.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
3838
// do something like 0.0/(2.0 - 2.0), but it would be nice to warn on that case too.
3939
let Some(Constant::Float(ref lhs_value, lhs_width)) = constant_simple(cx, left),
4040
let Some(Constant::Float(ref rhs_value, rhs_width)) = constant_simple(cx, right),
41-
let Ok(0.0) = lhs_value.parse(),
42-
let Ok(0.0) = rhs_value.parse()
41+
Ok(0.0) == lhs_value.parse(),
42+
Ok(0.0) == rhs_value.parse()
4343
], {
4444
// since we're about to suggest a use of std::f32::NaN or std::f64::NaN,
4545
// match the precision of the literals that are given.

0 commit comments

Comments
 (0)