clippy_utils::comparisons

Function normalize_comparison

source
pub fn normalize_comparison<'a>(
    op: BinOpKind,
    lhs: &'a Expr<'a>,
    rhs: &'a Expr<'a>,
) -> Option<(Rel, &'a Expr<'a>, &'a Expr<'a>)>
Expand description

Put the expression in the form lhs < rhs, lhs <= rhs, lhs == rhs or lhs != rhs.