Skip to content
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

Remove collapsible_if and collapsible_else_if lints #18797

Merged
merged 2 commits into from
Apr 18, 2023

Conversation

umanwizard
Copy link
Contributor

@umanwizard umanwizard commented Apr 17, 2023

When I added these lints two years ago, the justification I gave was "semantically wrong level of nesting". However, I have now realized that these lints can actually enforce a semantically wrong level of nesting. For example, the following natural code is rejected by the lint.

            let status = if pod_ready {
                ServiceStatus::Ready
            } else 
                if oomed {
                    ServiceStatus::NotReady(Some(NotReadyReason::OOMKilled))
                } else {
                    ServiceStatus::NotReady(None)
                }
            };

Thus, I am now of the opinion that my initial decision to include these lints was a mistake, and would like to remove them.

Discussion in Slack here.

@umanwizard umanwizard requested a review from a team April 17, 2023 14:32
@umanwizard umanwizard requested a review from a team as a code owner April 17, 2023 14:32
@umanwizard umanwizard requested a review from a team April 17, 2023 14:32
@umanwizard umanwizard requested review from a team and aalexandrov as code owners April 17, 2023 14:32
@umanwizard umanwizard requested a review from a team April 17, 2023 14:32
@umanwizard umanwizard merged commit 23d7cad into MaterializeInc:main Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants