Tracking Issue for `peek_index`
Open
@jogru0 is already working on this.
Since Apr 8, 2025.
C-tracking-issue
T-libs
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
- ACP https://github.com/rust-lang/libs-team/issues/435#issuecomment-2356672385
- PR https://github.com/rust-lang/rust/pull/139533
Feature gate: #![feature(peek_index)]
This is a tracking issue for the new peek_index function on the Enumerate iterator.
Public API
let e = vec![1, 2, 3].into_iter().enumerate();
assert_eq!(e.peek_index(), 0);
e.next();
assert_eq!(e.peek_index(), 1);
Steps / History
- Created ACP issue.
- Opened pull request following the ACP approval.
Unresolved Questions
- None yet.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.