Skip to main content

collect_if_chain_arms

Function collect_if_chain_arms 

Source
fn collect_if_chain_arms(
    chain: MirScalarExpr,
) -> (Vec<(Row, MirScalarExpr)>, Option<MirScalarExpr>, MirScalarExpr)
Expand description

Walks an If-chain and collects (literal_row, result_expr) pairs.

The input chain is consumed and dismantled. Returns (cases, common_candidate, els).