Clean the code a bit.
This commit is contained in:
parent
4fb1bb124e
commit
af2c93eeb2
@ -580,11 +580,7 @@ fn never_loop_expr(expr: &Expr, main_loop_id: &NodeId) -> NeverLoopResult {
|
|||||||
ExprIf(ref e, ref e2, ref e3) => {
|
ExprIf(ref e, ref e2, ref e3) => {
|
||||||
let e1 = never_loop_expr(e, main_loop_id);
|
let e1 = never_loop_expr(e, main_loop_id);
|
||||||
let e2 = never_loop_expr(e2, main_loop_id);
|
let e2 = never_loop_expr(e2, main_loop_id);
|
||||||
let e3 =
|
let e3 = e3.as_ref().map_or(NeverLoopResult::Otherwise, |e| never_loop_expr(e, main_loop_id));
|
||||||
match *e3 {
|
|
||||||
Some(ref e3) => never_loop_expr(e3, main_loop_id),
|
|
||||||
None => NeverLoopResult::Otherwise,
|
|
||||||
};
|
|
||||||
combine_seq(e1, combine_branches(e2, e3))
|
combine_seq(e1, combine_branches(e2, e3))
|
||||||
},
|
},
|
||||||
ExprLoop(ref b, _, _) => {
|
ExprLoop(ref b, _, _) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user