Skip to content

Should the reverse iterators on strings and vectors be removed? #9391

Description

@Kimundi

Most common iterators also implement DoubleEndedIterator, which means we can turn an Iterator into an reverse Iterator. The replacement would look like this:

"foo".rev_iter()             -> "foo".iter().invert()
"foo".byte_rev_iter()        -> "foo".byte_iter().invert()
"foo".char_offset_rev_iter() -> "foo".char_offset_iter().invert()
"foo".split_rev_iter()       -> "foo".split_iter().invert()

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-cleanupCategory: PRs that clean code up or issues documenting cleanup.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions