-
Notifications
You must be signed in to change notification settings - Fork 682
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
chore: Apply Clippy lint needless_collect
#5697
chore: Apply Clippy lint needless_collect
#5697
Conversation
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.
LGTM
Fixed unit tests by adding missing parenthesis. I'm surprised Rust didn't complain about this. Changed: if !event_ids.count() == 0 && !other_event_ids.count() == 0 to if !(event_ids.count() == 0) && !(other_event_ids.count() == 0) |
Don't need to change it. But couldn't you just do event_ids.count() != 0 and other_event_ids.count() != 0? |
I suppose I could have. Maybe Clippy will fix this in a future PR |
e0d3f3c
Description
Apply Clippy lint
needless_collect
. This finds places where iterators can be used directly, without having to callcollect()
and trigger a heap allocation