clippy_utils

Function if_sequence

Source
pub fn if_sequence<'tcx>(
    expr: &'tcx Expr<'tcx>,
) -> (Vec<&'tcx Expr<'tcx>>, Vec<&'tcx Block<'tcx>>)
Expand description

Returns the list of condition expressions and the list of blocks in a sequence of if/else. E.g., this returns ([a, b], [c, d, e]) for the expression if a { c } else if b { d } else { e }.