-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Tracking issue for BinaryHeap sorted iterator methods #59278
Copy link
Copy link
Open
Labels
A-collectionsArea: `std::collections`Area: `std::collections`A-iteratorsArea: IteratorsArea: IteratorsB-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCLibs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-collectionsArea: `std::collections`Area: `std::collections`A-iteratorsArea: IteratorsArea: IteratorsB-unstableBlocker: Implemented in the nightly compiler and unstable.Blocker: Implemented in the nightly compiler and unstable.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCLibs-TrackedLibs issues that are tracked on the team's project board.Libs issues that are tracked on the team's project board.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This tracks the stabilization of
BinaryHeap::into_iter_sorted(binary_heap_into_iter_sorted) andBinaryHeap::drain_sorted(binary_heap_drain_sorted) implemented in #65091.EDIT much later:
into_sorted_vec) need to be addressed before a future attempt to stabilize.Original feature request:
Currently, both
BinaryHeap::into_iterandBinaryHeap::drainyield 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 ofDoubleEndedIterator. Should we perhaps addinto_ordered_iteranddrain_ordered? The implementation is pretty straightforward so I'd be happy to submit a PR.