Skip to content

Commit 2a41d40

Browse files
committed
fix new lint error
1 parent 837bc99 commit 2a41d40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/map_unit_fn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ fn reduce_unit_expression<'a>(cx: &LateContext<'_>, expr: &'a hir::Expr<'_>) ->
131131
Some(expr.span)
132132
},
133133
hir::ExprKind::Block(ref block, _) => {
134-
match (&block.stmts[..], block.expr.as_ref()) {
134+
match (block.stmts, block.expr.as_ref()) {
135135
(&[], Some(inner_expr)) => {
136136
// If block only contains an expression,
137137
// reduce `{ X }` to `X`

0 commit comments

Comments
 (0)