-
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
needless_collect
enhancements
#7188
Conversation
- `len` might produce different results than `count` - they don't have `contain` but `contains_key` method
Those two types are supported already when used indirectly. This commit adds support for direct usage as well.
r? @phansch (rust-highfive has picked a reviewer for you, use r? to override) |
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.
The rest of the implementation looks good to me 🙃
+ small code refactor - using early returns.
Your changes look good to me. You can resolve my comments 🙃 |
📌 Commit b249290 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
fixes #7164
changelog:
needless_collect
: ForBTreeMap
andHashMap
lint onlyis_empty
, aslen
might produce different results than iter'scount
changelog:
needless_collect
: LintLinkedList
andBinaryHeap
in direct usage case as well