Skip to content

improve collapsible if in complex cases with same expressions #812

Open
@oli-obk

Description

@oli-obk
if a {
    if b {
        f();
    }
} else {
    f();
}

could be

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

Metadata

Metadata

Assignees

Labels

A-lintArea: New lintsC-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesgood first issueThese issues are a good way to get started with Clippy

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions