]> git.lizzy.rs Git - rust.git/commit
std: override clone_from for Vec.
authorHuon Wilson <dbau.pp+github@gmail.com>
Thu, 3 Apr 2014 11:28:45 +0000 (22:28 +1100)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 3 Apr 2014 20:42:32 +0000 (13:42 -0700)
commitf5a4837df0885368352d118e1e71f4853bf55bf8
tree782fff3828b54a74c2ec885379414b350e951c8b
parent0bd6f2ce0b650ebcb1d2b05dc501a9ed4907b6d2
std: override clone_from for Vec.

A vector can reuse its allocation (and the allocations/resources of any
contained values) when cloning into an already-instantiated vector, so
we might as well do so.
src/libstd/lib.rs
src/libstd/vec.rs