-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Add PeekableIterator
trait
#132976
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
base: master
Are you sure you want to change the base?
Add PeekableIterator
trait
#132976
Conversation
Since you said this isn't compilable, I've marked it waiting on author. Please flip it back once it's ready for a review. Note that if you're having trouble with any particular |
Do you think it would be better to remove the trait bound from the |
☔ The latest upstream changes (presumably #135937) made this pull request unmergeable. Please resolve the merge conflicts. |
Looks like this needs some conflicts resolved, at least? Once this is ready for review, please use |
Sorry, I haven’t had the motivation to work on this for a long time. I think this needs more thinking on design. |
Adds the
PeekableIterator
trait (tracking issue: #132973) and implementations forslice::Iter
andops::Range
.I tried to implement it for
Cloned
, but I couldn’t get the types and lifetimes to line up, so the unit test atlibrary/core/tests/iter/traits/peekable.rs
is not yet compilable.