-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Use if-let guards in the codebase and various other pattern cleanups #88066
Conversation
r? @nagisa (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
afea228
to
842f273
Compare
This comment has been minimized.
This comment has been minimized.
842f273
to
df96274
Compare
Please split up the different kinds of cleanups (i.e. those that use I think the scope of this PR is otherwise reasonable enough for dogfooding purposes. |
f01bac0
to
e8f3821
Compare
@nagisa I split the changes in two commits as you requested. Since the bulk of the changes is actually reindenting the code (caused by removing an if-let block), the diff will look less noisy if viewed with whitespace changes hidden. I also forgot to mention that rustfmt doesn't yet support formatting if-let guards (rust-lang/rustfmt#4955) so I tried my best to format them by hand. |
Seems nice. Up to you if you want to handle the comments above. @bors delegate=LeSeulArtichaut |
✌️ @LeSeulArtichaut can now approve this pull request |
e8f3821
to
f83887d
Compare
@nagisa Replaced the problematic patterns with if-let guards. |
@bors r=nagisa |
📌 Commit f83887d5dc94c25acfbdbc2b51aa19bd7f5ff1ee has been approved by |
f83887d
to
1cfb326
Compare
Removed all |
📌 Commit 1cfb326b5caba719be0553c1b0bb56c974955dbc has been approved by |
This comment has been minimized.
This comment has been minimized.
e4d4aa3
to
2b0c8ff
Compare
@bors r=nagisa |
📌 Commit 2b0c8ff has been approved by |
☀️ Test successful - checks-actions |
Dogfooding if-let guards as experimentation for the feature.
Tracking issue #51114. Conflicts with #87937.