Skip to content

improve collapsible if in complex cases with same expressions #812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
oli-obk opened this issue Mar 30, 2016 · 1 comment · May be fixed by #15027
Open

improve collapsible if in complex cases with same expressions #812

oli-obk opened this issue Mar 30, 2016 · 1 comment · May be fixed by #15027
Assignees
Labels
A-lint Area: New lints C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages good first issue These issues are a good way to get started with Clippy

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Mar 30, 2016

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

could be

if !a || b {
    f();
}
@mcarton mcarton added good first issue These issues are a good way to get started with Clippy C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages A-lint Area: New lints labels Mar 30, 2016
@Arc8ne
Copy link

Arc8ne commented Jun 3, 2025

@rustbot claim

Arc8ne added a commit to Arc8ne/rust-clippy that referenced this issue Jun 10, 2025
@Arc8ne Arc8ne linked a pull request Jun 10, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: New lints C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages good first issue These issues are a good way to get started with Clippy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants