]> git.lizzy.rs Git - rust.git/commitdiff
fmt
authorPhilipp Hansch <dev@phansch.net>
Mon, 5 Aug 2019 18:53:13 +0000 (20:53 +0200)
committerPhilipp Hansch <dev@phansch.net>
Mon, 5 Aug 2019 18:53:24 +0000 (20:53 +0200)
clippy_lints/src/needless_bool.rs

index 199420071cc3b0fc273fec9fdc5c795a66944287..285ec0d081f37d24939bb8dc4e14cac00cf0e78b 100644 (file)
@@ -119,13 +119,9 @@ fn parent_node_is_if_expr<'a, 'b>(expr: &Expr, cx: &LateContext<'a, 'b>) -> bool
     let parent_node = cx.tcx.hir().get(parent_id);
 
     match parent_node {
-        rustc::hir::Node::Expr(e) => {
-            higher::if_block(&e).is_some()
-        },
-        rustc::hir::Node::Arm(e) => {
-            higher::if_block(&e.body).is_some()
-        },
-        _ => false
+        rustc::hir::Node::Expr(e) => higher::if_block(&e).is_some(),
+        rustc::hir::Node::Arm(e) => higher::if_block(&e.body).is_some(),
+        _ => false,
     }
 }