-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add waker_clone_and_wake
lint to check needless Waker
clones
#11698
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @giraffate (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
This'd be a good one @y21 |
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.
Implementation looks pretty good already! Most of my comments are just nits.
Unsure about the lint name. What about just waker_clone_wake
? I think that would go well with how some other lints are named after a chain of method calls, e.g. filter_map_bool_then
aa5d7b2
to
f879096
Compare
Can you add a changelog entry to the PR description?
should be good enough |
Isn't that the role of release ? Where should I put that ? Section for 1.75 isn't there yet. |
Sorry, I meant the PR body. The text area where you're currently describing what the PR does. The changelog entry should go there (doesn't really matter where I don't think, could put that at the bottom). This is all normally explained in the input box when you (are about to) open a PR, it might be that you skipped that part. :)
For every release, someone manually reviews all the changelog comments from all merged PRs in that timeframe and prepares the changelog.md for that release. |
Done! |
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.
This looks good to me. cc @Alexendoo
Looks good, thanks! @bors r=y21 |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Thanks for implementing this lint @a1phyr! :) |
Check for patterns of
waker.clone().wake()
and replace them withwaker.wake_by_ref()
.An alternative name could be
waker_clone_then_wake
changelog: [
waker_clone_wake
]: new lint