rust-lang/rust-clippy

improve collapsible if in complex cases with same expressions

Open

#812 建立於 2016年3月30日

在 GitHub 查看
 (1 留言) (0 反應) (1 負責人)Rust (10,406 star) (1,391 fork)batch import
A-lintC-enhancementgood first issue

描述

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

could be

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

貢獻者指南