Skip to content

Conversation

@bluebear94
Copy link
Contributor

Adds the PeekableIterator trait (tracking issue: #132973) and implementations for slice::Iter and ops::Range.

I tried to implement it for Cloned, but I couldn’t get the types and lifetimes to line up, so the unit test at library/core/tests/iter/traits/peekable.rs is not yet compilable.

@rustbot
Copy link
Collaborator

rustbot commented Nov 13, 2024

r? @scottmcm

rustbot has assigned @scottmcm.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 13, 2024
@scottmcm scottmcm added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 20, 2024
@scottmcm
Copy link
Member

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 impl, I'd suggest just skipping it for now. Additional impls can always come later in future PRs; they don't need to be in the first one.

@bluebear94
Copy link
Contributor Author

Do you think it would be better to remove the trait bound from the PeekedItem associated type altogether?

@bors
Copy link
Collaborator

bors commented Jan 27, 2025

☔ The latest upstream changes (presumably #135937) made this pull request unmergeable. Please resolve the merge conflicts.

@scottmcm
Copy link
Member

Looks like this needs some conflicts resolved, at least?

Once this is ready for review, please use @rustbot ready so the bot will update the labels appropriately to bring it back to my radar.

@bluebear94
Copy link
Contributor Author

Sorry, I haven’t had the motivation to work on this for a long time. I think this needs more thinking on design.

@Dylan-DPC
Copy link
Member

Closing this as there hasn't been any work on this and it requires a redesign which might be better suited for a new pr and/or ACP. Thanks for contributing.

@Dylan-DPC Dylan-DPC closed this Aug 3, 2025
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants