Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Clone impl for miri stacked-borrows model
This clone impl would sucessfully run under `MIRIFLAGS=-Zmiri-tree-borrows` but failed with stacked borrows. Instead of cloning the extra capacity into the new vec. Create a new vector with the correct capacity then extend it with the cloned contents of the other vector. This can be done safely.
- Loading branch information