Skip to content

Commit 587c688

Browse files
committed
Update mixed_read_write_in_expression.rs
1 parent 87d73ba commit 587c688

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/mixed_read_write_in_expression.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ impl<'a, 'tcx> Visitor<'tcx> for DivergenceVisitor<'a, 'tcx> {
145145
return;
146146
}
147147

148-
if let Some(stmt) = block.stmts.first() && block.stmts.len() == 1 {
148+
if let [stmt] = block.stmts && block.stmts.len() == 1 {
149149
match stmt.kind {
150150
StmtKind::Expr(e) | StmtKind::Semi(e) => self.visit_expr(e),
151151
_ => {},

0 commit comments

Comments
 (0)