]> git.lizzy.rs Git - rust.git/commit
auto merge of #19236 : csouth3/rust/master, r=Gankro
authorbors <bors@rust-lang.org>
Mon, 24 Nov 2014 07:51:32 +0000 (07:51 +0000)
committerbors <bors@rust-lang.org>
Mon, 24 Nov 2014 07:51:32 +0000 (07:51 +0000)
commitf5b92b4b7a08290833e698ca374f3154e16e9714
tree5a219467e20e9adae5965bc55bd2d955b50f3a5c
parentc637cab85323c97be37d0c12bfa0fc0e9ea2c367
parent3f8e2690bec118bc217fddf4715d603341c6e4d7
auto merge of #19236 : csouth3/rust/master, r=Gankro

Whilst browsing the source for BinaryHeap, I saw a FIXME for implementing into_iter.  I think, since the BinaryHeap is represented internally using just a Vec, just calling into_iter() on the BinaryHeap's data should be sufficient to do what we want here.  If this actually isn't the right approach (e.g., I should write a struct MoveItems and appropriate implementation for BinaryHeap instead), let me know and I'll happily rework this.

Both of the tests that I have added pass.  This is my first contribution to Rust, so please let me know any ways I can improve this PR!
src/libcollections/binary_heap.rs