]> git.lizzy.rs Git - rust.git/commit
Use ptr::drop_in_place in VecDeque::drop
authorUlrik Sverdrup <bluss@users.noreply.github.com>
Wed, 2 Mar 2016 16:54:43 +0000 (17:54 +0100)
committerUlrik Sverdrup <bluss@users.noreply.github.com>
Wed, 2 Mar 2016 17:05:41 +0000 (18:05 +0100)
commit7ceafaee4f3d8ed2268b1659dd99a541d71689a3
tree65266bd844ac98acd2dc59b2cdb8b9666be1c1a4
parent1da364e98f46c828e5746be299b58b995e5f5007
Use ptr::drop_in_place in VecDeque::drop

Just like for Vec. This should benefit both non-optimized and optimized
performance. Non-optimized since the intrinsic drop_in_place is easily
removed, and optimized because iterating the slices is more efficient
than using the VecDeque iterators.
src/libcollections/vec_deque.rs