Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
phansch committed Aug 5, 2019
1 parent 4cfb096 commit cdfb72a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions clippy_lints/src/needless_bool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}

Expand Down

0 comments on commit cdfb72a

Please sign in to comment.