3 ms·
You don't even need `std::mem::take`, you can just `drain` the `Vec`. This also allows the allocation to be reused, unlike your `mem::take` which ends up droppi
by divingdragon 6y ago
You don't even need `std::mem::take`, you can just `drain` the `Vec`. This also allows the allocation to be reused, unlike your `mem::take` which ends up dropping the allocation.
`Vec::drain`: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.drain https://doc.rust-lang.org/std/vec/struct.Vec.html#method.dra...