Skip to content

Commit f177835

Browse files
committed
fix whatever this is
1 parent 6de463c commit f177835

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

clippy_lints/src/len_zero.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,11 @@ impl<'tcx> LateLintPass<'tcx> for LenZero {
176176
if let ExprKind::Let(lt) = expr.kind
177177
&& match lt.pat.kind {
178178
PatKind::Slice([], None, []) => true,
179-
PatKind::Expr(lit) => match lit.kind {
180-
PatExprKind::Lit { lit, .. } => match lit.node {
181-
LitKind::Str(lit, _) => lit.as_str().is_empty(),
182-
_ => false,
183-
},
184-
_ => false,
179+
PatKind::Expr(lit)
180+
if let PatExprKind::Lit { lit, .. } = lit.kind
181+
&& let LitKind::Str(lit, _) = lit.node =>
182+
{
183+
lit.as_str().is_empty()
185184
},
186185
_ => false,
187186
}

0 commit comments

Comments
 (0)