-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Missing size_hint overrides in some Iterators implementations #23708
Comments
cc @aturon, this may some day tie into |
Yes, these implementations (and other) will need to change if |
The bounds may change somewhat if we expect to be able to define |
`Iterator::size_hint` can be easily implemented for `StepBy`. #23708
This also implements ExactSizeIterator where applicable. Addresses most of the Iterator traits mentioned in rust-lang#23708.
I've compiled a more complete list of iterators without size_hints, and will make a new tracking issue for them. |
New tracking issue for expanded list: #49205 |
Implement some trivial size_hints for various iterators This also implements ExactSizeIterator where applicable. Addresses most of the Iterator traits mentioned in #23708. I intend to do more, but I don't want to make the PR too large.
Closing for #49205. |
Some implementations of
Iterator
don’t override thesize_hint
method (and keep the conservative(0, None)
default), but should. This includes at least:CC @alexcrichton
The text was updated successfully, but these errors were encountered: