mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-16 17:58:14 +00:00
fix new lint error
This commit is contained in:
parent
837bc99065
commit
2a41d40807
1 changed files with 1 additions and 1 deletions
|
@ -131,7 +131,7 @@ fn reduce_unit_expression<'a>(cx: &LateContext<'_>, expr: &'a hir::Expr<'_>) ->
|
||||||
Some(expr.span)
|
Some(expr.span)
|
||||||
},
|
},
|
||||||
hir::ExprKind::Block(ref block, _) => {
|
hir::ExprKind::Block(ref block, _) => {
|
||||||
match (&block.stmts[..], block.expr.as_ref()) {
|
match (block.stmts, block.expr.as_ref()) {
|
||||||
(&[], Some(inner_expr)) => {
|
(&[], Some(inner_expr)) => {
|
||||||
// If block only contains an expression,
|
// If block only contains an expression,
|
||||||
// reduce `{ X }` to `X`
|
// reduce `{ X }` to `X`
|
||||||
|
|
Loading…
Reference in a new issue