about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJason Newcomb <jsnewcomb@pm.me>2020-12-31 11:42:12 -0500
committerJason Newcomb <jsnewcomb@pm.me>2021-01-15 16:41:17 -0500
commit2a41d40807ccf01268c29ba64ac9ea0efe1b26f7 (patch)
tree633cace719427b805af32b438517d4777ace3a85
parent837bc9906552af5da429bef4b37be588b8d2f49d (diff)
downloadrust-2a41d40807ccf01268c29ba64ac9ea0efe1b26f7.tar.gz
rust-2a41d40807ccf01268c29ba64ac9ea0efe1b26f7.zip
fix new lint error
-rw-r--r--clippy_lints/src/map_unit_fn.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/map_unit_fn.rs b/clippy_lints/src/map_unit_fn.rs
index e50d11a4d71..01126e86199 100644
--- a/clippy_lints/src/map_unit_fn.rs
+++ b/clippy_lints/src/map_unit_fn.rs
@@ -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`