-
Notifications
You must be signed in to change notification settings - Fork 1.6k
new lint: drain_collect
#10835
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
new lint: drain_collect
#10835
Conversation
r? @dswij (rustbot has picked a reviewer for you, use r? to override) |
☔ The latest upstream changes (presumably #10358) made this pull request unmergeable. Please resolve the merge conflicts. |
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 great, thanks for this!
@bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Closes #10818.
This adds a new lint that looks for
.drain(..).collect()
and suggests replacing it withmem::take
.changelog: [
drain_collect
]: new lint