Skip to content

Drain should not be marked as must_use #435

@Possseidon

Description

@Possseidon

Drain is currently marked as #[must_use = "iterators are lazy and do nothing unless consumed"]. However, while drain can be used to iterate, it is also commonly used to just remove a range of characters.

Fwiw, none of the Drain implementations in std (that I've looked at) are marked as must_use either, presumably for that very reason.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions