Skip to content

Commit e4daa5a

Browse files
committed
apply obfuscated_if_else to clippy source
1 parent 22be689 commit e4daa5a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

clippy_lints/src/len_zero.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,11 @@ impl<'tcx> LateLintPass<'tcx> for LenZero {
202202
expr.span,
203203
lhs_expr,
204204
peel_ref_operators(cx, rhs_expr),
205-
(method.ident.name == sym::ne).then_some("!").unwrap_or_default(),
205+
if method.ident.name == sym::ne {
206+
"!"
207+
} else {
208+
Default::default()
209+
},
206210
);
207211
}
208212

0 commit comments

Comments
 (0)