fix new lint error

This commit is contained in:
Jason Newcomb 2020-12-31 11:42:12 -05:00
parent 837bc99065
commit 2a41d40807
No known key found for this signature in database
GPG key ID: DA59E8643A37ED06

View file

@ -131,7 +131,7 @@ fn reduce_unit_expression<'a>(cx: &LateContext<'_>, expr: &'a hir::Expr<'_>) ->
Some(expr.span)
},
hir::ExprKind::Block(ref block, _) => {
match (&block.stmts[..], block.expr.as_ref()) {
match (block.stmts, block.expr.as_ref()) {
(&[], Some(inner_expr)) => {
// If block only contains an expression,
// reduce `{ X }` to `X`