Skip to content

Commit c1b65ec

Browse files
committed
fix line format
1 parent 7bc2e1d commit c1b65ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clippy_lints/src/loops.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -2218,7 +2218,8 @@ fn is_conditional(expr: &Expr) -> bool {
22182218
fn is_nested(cx: &LateContext<'_, '_>, match_expr: &Expr, iter_expr: &Expr) -> bool {
22192219
if_chain! {
22202220
if let Some(loop_block) = get_enclosing_block(cx, match_expr.hir_id);
2221-
if let Some(Node::Expr(loop_expr)) = cx.tcx.hir().find_by_hir_id(cx.tcx.hir().get_parent_node_by_hir_id(loop_block.hir_id));
2221+
let parent_node = cx.tcx.hir().get_parent_node_by_hir_id(loop_block.hir_id);
2222+
if let Some(Node::Expr(loop_expr)) = cx.tcx.hir().find_by_hir_id(parent_node);
22222223
then {
22232224
return is_loop_nested(cx, loop_expr, iter_expr)
22242225
}

0 commit comments

Comments
 (0)