-
Notifications
You must be signed in to change notification settings - Fork 85
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
Add iter size hints #141
Add iter size hints #141
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.
I find this PR great, as it removes the panics everywhere. I was not even sure of why they were there. Thank you!
bors merge
} | ||
} | ||
|
||
impl<'a> ExactSizeIterator for Iter<'a> { |
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.
impl<'a> ExactSizeIterator for Iter<'a> { | |
impl ExactSizeIterator for Iter<'_> { |
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.
Whoops, I merged it... 🤦
Build succeeded: |
141: Add iter size hints r=Kerollmops a=saik0 This is a blocker for RoaringBitmap#140 as proptest calls `size_hint` when generate / shrinking. Could only implement ExactSizeIterator on the outer (Bit|Tree)Maps on 64 bit architectures to ensure the `u64` value is not truncated when casting to usize. Co-authored-by: saik0 <[email protected]>
142: Migrate to proptest r=Kerollmops a=saik0 Closes RoaringBitmap#140 Depends on RoaringBitmap#141 (will not work correctly with 0b4c044) See RoaringBitmap#140 for details Co-authored-by: saik0 <[email protected]>
This is a blocker for #140 as proptest calls
size_hint
when generate / shrinking.Could only implement ExactSizeIterator on the outer (Bit|Tree)Maps on 64 bit architectures to ensure the
u64
value is not truncated when casting to usize.