This commit is contained in:
Philipp Hansch 2019-08-05 20:53:13 +02:00
parent 4cfb0966a1
commit cdfb72a5e1
No known key found for this signature in database
GPG Key ID: 82AA61CAA11397E6

View 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,
}
}