-
Notifications
You must be signed in to change notification settings - Fork 184
chore: use derive_more::IntoIterator
#6480
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
Conversation
WalkthroughTipsetKey now derives IntoIterator via derive_more with an #[into_iterator(owned, ref)] on its inner field; CidHashSet drops its manual IntoIter and IntoIterator impls, relying on the derived iterator behavior. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
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.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/cid_collections/hash_set.rs`:
- Around line 13-16: The derived derive_more::IntoIterator on CidHashSet yields
(Cid, ()) tuples from the inner CidHashMap and breaks consumers expecting Item =
Cid; remove the derive for IntoIterator and add custom IntoIterator impls for
CidHashSet and for &CidHashSet: implement IntoIterator for CidHashSet with type
Item = Cid and IntoIter = std::collections::hash_map::IntoKeys<Cid, ()>
returning self.inner.into_keys(), and implement IntoIterator for &'a CidHashSet
with type Item = &'a Cid and IntoIter = std::collections::hash_map::Keys<'a,
Cid, ()> returning self.inner.keys() so iteration yields keys only.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
... and 8 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Summary of changes
Changes introduced in this pull request:
derive_morezenReference issue to close (if applicable)
Closes
Other information and links
Change checklist
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.