Skip to content

Rephrase docs for Vec::drain to better clarify Drop behavior #39134

Closed
@QuietMisdreavus

Description

@QuietMisdreavus

(This is mostly for my own benefit as I've been separated from my Rust fork and associated development environment. If someone wants to pick this up, though, it's a wonderful first dive into documentation contributions! :3)

The "Note 1" on Vec::drain could be rephrased to be more clear. Something like "Note 1: The element range is removed even if the iterator is only partially consumed or not consumed at all." Some discussion in rust-beginners revealed some confusion around the current "is not consumed until the end" phrasing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions