-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Use Option::filter instead of open-coding it #77882
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
Conversation
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
73586b7
to
b1e8fe1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. @LingMan This is the way to go if you want to do these style changes, I think keeping it small have a higher chance of being accepted.
☔ The latest upstream changes (presumably #77135) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
b1e8fe1
to
5c1e5cb
Compare
I am not a maintainer of this particular code section, but the new version looks significantly less readable to me. cc @matklad @petrochenkov as well |
Yeah, I also don't think this is an improvement. Although the high-level semantic here is indeed that of Thanks for the PR anyway, @LingMan, it's useful to see two versions side by side to better understand which one is better! |
Huh, interesting. I find it more readable because there's less brain power spent on deciphering the high-level semantic and more focus on what's relevant. |
No description provided.