Skip to content

Extend Iterator::Find page with examples of Iterator::Position #1261

Closed
rust-lang/rust
#64979

Description

These two methods are so similar - both iterate an iterator until they find a value that matches a predicate. The only difference is one returns the element, and one returns its index.

Because of this, they should probably go on the same page. Currently the book doesn't document Iterator::position.

We could probably include a link to Iterator::rposition here too.

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

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