]> git.lizzy.rs Git - rust.git/commitdiff
fix line format
authorljedrz <ljedrz@gmail.com>
Tue, 26 Feb 2019 10:21:07 +0000 (11:21 +0100)
committerljedrz <ljedrz@gmail.com>
Tue, 26 Feb 2019 10:21:07 +0000 (11:21 +0100)
clippy_lints/src/loops.rs

index 9439a3ff4546e3bd225e1dc4436a4c23dbb911a0..73da2467f59c2d64cd03b62581aabde93e2e5183 100644 (file)
@@ -2218,7 +2218,8 @@ fn is_conditional(expr: &Expr) -> bool {
 fn is_nested(cx: &LateContext<'_, '_>, match_expr: &Expr, iter_expr: &Expr) -> bool {
     if_chain! {
         if let Some(loop_block) = get_enclosing_block(cx, match_expr.hir_id);
-        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));
+        let parent_node = cx.tcx.hir().get_parent_node_by_hir_id(loop_block.hir_id);
+        if let Some(Node::Expr(loop_expr)) = cx.tcx.hir().find_by_hir_id(parent_node);
         then {
             return is_loop_nested(cx, loop_expr, iter_expr)
         }