Skip to content
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

Add Iterator::map_windows #94667

Merged
merged 1 commit into from
Aug 13, 2023
Merged

Commits on Aug 10, 2023

  1. Add Iterator::map_windows

    This is inherited from the old PR.
    
    This method returns an iterator over mapped windows of the starting
    iterator. Adding the more straight-forward `Iterator::windows` is not
    easily possible right now as the items are stored in the iterator type,
    meaning the `next` call would return references to `self`. This is not
    allowed by the current `Iterator` trait design. This might change once
    GATs have landed.
    
    The idea has been brought up by @m-ou-se here:
    https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Iterator.3A.3A.7Bpairwise.2C.20windows.7D/near/224587771
    
    Co-authored-by: Lukas Kalbertodt <lukas.kalbertodt@gmail.com>
    frank-king and LukasKalbertodt committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    97c953f View commit details
    Browse the repository at this point in the history