Skip to main content

simplify

Function simplify 

Source
fn simplify(
    ctx: &LintContext<'_, '_>,
    expr: &Expr<'_>,
    op: BinOpKind,
    constant: bool,
) -> Option<String>
Expand description

x == true / x != false simplify to x, the other two forms to !x.