mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
2843baaeb6
alloc: Added `as_slice` method to `BinaryHeap` collection I initially asked about whether it is useful addition on https://internals.rust-lang.org/t/should-i-add-as-slice-method-to-binaryheap/13816, and it seems there were no objections, so went ahead with this PR. > There is [`BinaryHeap::into_vec`](https://doc.rust-lang.org/std/collections/struct.BinaryHeap.html#method.into_vec), but it consumes the value. I wonder if there is API design limitation that should be taken into account. Implementation-wise, the inner buffer is just a Vec, so it is trivial to expose as_slice from it. Please, guide me through if I need to add tests or something else. UPD: Tracking issue #83659 |
||
---|---|---|
.. | ||
arc.rs | ||
binary_heap.rs | ||
borrow.rs | ||
boxed.rs | ||
btree_set_hash.rs | ||
cow_str.rs | ||
fmt.rs | ||
heap.rs | ||
lib.rs | ||
linked_list.rs | ||
rc.rs | ||
slice.rs | ||
str.rs | ||
string.rs | ||
vec_deque.rs | ||
vec.rs |