]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #65069 - crgl:clone-from-vec-deque, r=bluss
authorMazdak Farrokhzad <twingoow@gmail.com>
Sun, 13 Oct 2019 11:34:29 +0000 (13:34 +0200)
committerGitHub <noreply@github.com>
Sun, 13 Oct 2019 11:34:29 +0000 (13:34 +0200)
Implement Clone::clone_from for VecDeque

See #28481. For simple data types with the target much longer than the source, this implementation can be significantly slower than the default (probably due to the use of truncate). However, it should be substantially faster when cloning from nested data structures with similar shapes or when cloning from VecDeques with similar lengths, hopefully more common use cases for clone_from.


Trivial merge