rust-lang/rust-clippy

improve collapsible if in complex cases with same expressions

Open

#812 opened on Mar 30, 2016

View on GitHub
 (1 comment) (0 reactions) (1 assignee)Rust (10,406 stars) (1,391 forks)batch import
A-lintC-enhancementgood first issue

Description

if a {
    if b {
        f();
    }
} else {
    f();
}

could be

if !a || b {
    f();
}

Contributor guide