slab icon indicating copy to clipboard operation
slab copied to clipboard

Feature request: partial drain

Open redbaron opened this issue 2 years ago • 1 comments

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

?

redbaron avatar Mar 11 '23 06:03 redbaron