Open
Description
This tracks the stabilization of BinaryHeap::into_iter_sorted
(binary_heap_into_iter_sorted
) and BinaryHeap::drain_sorted
(binary_heap_drain_sorted
) implemented in #65091.
EDIT much later:
- Stabilize feature(binary_heap_into_iter_sorted) #76234 looked at stabilizing part of this, but didn't come to a conclusion that it was ready-to-go as-is. The questions from there (such as consistency in order with
into_sorted_vec
) need to be addressed before a future attempt to stabilize.
Original feature request:
Currently, both BinaryHeap::into_iter
and BinaryHeap::drain
yield the heap elements in an arbitrary order. This seems counter-intuitive given the nature of a heap. Sadly, we can't simply change their behavior behind the scenes, as we would have to remove the implementation of DoubleEndedIterator
. Should we perhaps add into_ordered_iter
and drain_ordered
? The implementation is pretty straightforward so I'd be happy to submit a PR.
Metadata
Metadata
Assignees
Labels
Area: `std::collections`Area: IteratorsBlocker: Implemented in the nightly compiler and unstable.Category: An issue tracking the progress of sth. like the implementation of an RFCLibs issues that are tracked on the team's project board.Relevant to the library API team, which will review and decide on the PR/issue.