jsonstein@masto.deoan.org ("Jeff Sonstein") wrote:
powerful/dangerous ;^}
#LearningRust
-----"pub fn drain(&mut self) -> Drain<'_, K, V> ⓘ
Clears the map, returning all key-value pairs as an iterator. Keeps the allocated memory for reuse.If the returned iterator is dropped before being fully consumed, it drops the remaining key-value pairs. The returned iterator keeps a mutable borrow on the map to optimize its implementation."