dashmap
dashmap copied to clipboard
Avoid overallocating or growing Vec in Clone
We can collect directly into the Box<[T]>
to avoid pushing to a Vec
, which could overallocate and require a reallocation when shrinking in Vec::into_boxed_slice
or have to reallocate multiple times as it wouldn't know the finishing capacity.