Skip to content

[docs] Drain filter pseudo code incorrect #44499

Description

@mystise

https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.drain_filter

It appears that i should not be incremented if a value is removed from the array, as that'll cause values to be skipped and perhaps out of bounds access (say if the last element is removed, i will be incremented and one past the end of the array will be accessed)

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

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions