Skip to content

Feature request: partial drain #135

@redbaron

Description

@redbaron

For my usecase I'd like to pop N elements, leaving them vacant. Currently Drain removes all entries. Is it possible to add a variant of drain which on each .next():

  • returns by move stored element
  • stores Entry::Vacant in place

?

Metadata

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