Skip to content

Commit

Permalink
Clean the code a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentMazare committed Nov 5, 2017
1 parent 4fb1bb1 commit af2c93e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions clippy_lints/src/loops.rs
Expand Up @@ -580,11 +580,7 @@ fn never_loop_expr(expr: &Expr, main_loop_id: &NodeId) -> NeverLoopResult {
ExprIf(ref e, ref e2, ref e3) => {
let e1 = never_loop_expr(e, main_loop_id);
let e2 = never_loop_expr(e2, main_loop_id);
let e3 =
match *e3 {
Some(ref e3) => never_loop_expr(e3, main_loop_id),
None => NeverLoopResult::Otherwise,
};
let e3 = e3.as_ref().map_or(NeverLoopResult::Otherwise, |e| never_loop_expr(e, main_loop_id));
combine_seq(e1, combine_branches(e2, e3))
},
ExprLoop(ref b, _, _) => {
Expand Down

0 comments on commit af2c93e

Please sign in to comment.