diff options
| author | ljedrz <ljedrz@gmail.com> | 2019-02-26 11:21:07 +0100 |
|---|---|---|
| committer | ljedrz <ljedrz@gmail.com> | 2019-02-26 11:21:07 +0100 |
| commit | c1b65ec363e552e1698949e34fc59a9196cbbcd9 (patch) | |
| tree | 132e9b71fc5208bd65143b421434da0d6e4b5000 | |
| parent | 7bc2e1d60d23a2f6a31d7a04d40171372d80b5b3 (diff) | |
| download | rust-c1b65ec363e552e1698949e34fc59a9196cbbcd9.tar.gz rust-c1b65ec363e552e1698949e34fc59a9196cbbcd9.zip | |
fix line format
| -rw-r--r-- | clippy_lints/src/loops.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clippy_lints/src/loops.rs b/clippy_lints/src/loops.rs index 9439a3ff454..73da2467f59 100644 --- a/clippy_lints/src/loops.rs +++ b/clippy_lints/src/loops.rs @@ -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) } |
