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 (1,391 forks)batch import
A-lintC-enhancementgood first issue

Repository metrics

Stars
 (10,406 stars)
PR merge metrics
 (Avg merge 19d 22h) (113 merged PRs in 30d)

Description

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

could be

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

Contributor guide