Skip to content

Expand OptionFlatten's iterator methods#153097

Open
cuviper wants to merge 1 commit intorust-lang:mainfrom
cuviper:expand-into_flat_iter
Open

Expand OptionFlatten's iterator methods#153097
cuviper wants to merge 1 commit intorust-lang:mainfrom
cuviper:expand-into_flat_iter

Conversation

@cuviper
Copy link
Member

@cuviper cuviper commented Feb 25, 2026

If someone considers moving from option.into_iter().flatten() to
option.into_flat_iter(), it may be important for performance that this
iterator "specializes" methods the same way Flatten does, especially
forwarding to underlying fold, etc.

If someone considers moving from `option.into_iter().flatten()` to
`option.into_flat_iter()`, it may be important for performance that this
iterator "specializes" methods the same way `Flatten` does, especially
forwarding to underlying `fold`, etc.
@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 Feb 25, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 25, 2026

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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @scottmcm, libs
  • @scottmcm, libs expanded to 8 candidates
  • Random selection from Mark-Simulacrum, joboet, scottmcm

@cuviper
Copy link
Member Author

cuviper commented Feb 25, 2026

PS: I think this could also implement the TrustedRandomAccess* traits and Iterator::__iterator_get_unchecked, but that's probably better considered as its own PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants