Skip to content

Why PeekingNext does not provide peek method? #583

@TonalidadeHidrica

Description

@TonalidadeHidrica

In my understanding, PeekingNext is a iterator from which we can obtain the reference to the next element. Currently this trait requires peeking_next function, that consumes the next element when the predicate is satisfied. But what if I want the peek behavior, in which the next element is not consumed? I think it is reasonable to provide such trait method too. Is there a reason that there isn't?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions