Open
Description
Feature gate: #![feature(binary_heap_peek_mut_refresh)]
This is a tracking issue for #138161 . This allows efficiently re-obtaining the maximum element of a binary heap after the peeked element was modified, and determines if the heap has changed as a result of that element modification.
Public API
// alloc::collections::binary_heap;
impl<'a, T: Ord, A: Allocator> PeekMut<'a, T, A> {
pub fn refresh(&mut self) -> bool;
}
Steps / History
- Implementation: Add PeekMut::refresh #138161
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- Decide on a name to stabilize. Future interfaces for mutable handles into other sorted
std
collections should be consistent but there are no others yet.