-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Extend needless_collect
#8744
Extend needless_collect
#8744
Conversation
r? @camsteffen (rust-highfive has picked a reviewer for you, use r? to override) |
109036a
to
34a9551
Compare
☔ The latest upstream changes (presumably #8802) made this pull request unmergeable. Please resolve the merge conflicts. |
r? @llogiq |
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 in general, although some of the stuff goes over my head.
Unfortunately I got some pink eye today, so my first review is rather cursory, as I try to limit my screen time. Will come back to this once I got some antibiotics, but today is a bank holiday here in 🇩🇪.
Ok, I'm back. My eyes have fully recovered. Also, this looks good in general, and if you don't want to refactor it, I'm fine with merging it after a rebase and doing the refactor myself later (if nobody beats me to it). |
I'll get to it this sometime this week. |
Ping @Jarcho anything I can do to help? |
This is still on my todo list. Ended up getting sick instead of working on this. Better now though. |
Ping! So I guess this fell off the top of your Todo list. No hard feelings here, but it would be great to see this through. @rustbot author |
0e9183d
to
9878f57
Compare
9878f57
to
49bf221
Compare
Should be good now. |
The current commit fails dogfood. Apparently because of the recently introduced format args lint. |
49bf221
to
8bfc8bc
Compare
Thanks! @bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Extends when
is_empty
andcontains
are linted.is_empty
will be linted when<IterTy as Iterator>::Item
is the same as<CollectTy as IntoIterator>::Item
. This can be a false positive if theFromIterator
implementation filters out items, but I don't know of any which do that also implementIntoIterator
with a matchingItem
type.contains
will be linted when the argument type is&<IterTy as Iterator>::Item
. It has the same false positives asis_empty
with the same note that I know of nothing that actually causes that in practice.changelog: Lint
needless_collect
whenis_empty
orcontains
is called on some non-std types