Commit 5360b050 authored by Andrew Jones's avatar Andrew Jones


parent fa3df949
Pipeline #102367 failed with stages
in 4 minutes and 30 seconds
......@@ -216,6 +216,11 @@ where
T: 'a + PackedLayout + Ord,
heap: &'a mut BinaryHeap<T>,
/// If `true`, on `drop()` will sift the peeked value down the tree if after mutation it is no
/// longer the largest value, in order to keep the heap in a consistent state.
/// If the peeked value is consumed via `PeekMut::pop()` then this is set to false to prevent
/// a redundant reorg which would already have happened via `BinaryHeap::pop()`.
sift: bool,
......@@ -14,7 +14,7 @@
//! [`BinaryHeap`](`super::BinaryHeap`) is a max-heap by default, where the *largest* element will
//! be returned by `heap.pop()`. To use a [`BinaryHeap`](`super::BinaryHeap`) as a min-heap, where
//! the *smallest* element returned by `heap.pop()`, the type `T` of the binary tree can be wrapped
//! the *smallest* element returned by `heap.pop()`, the type `T` of the binary heap can be wrapped
//! in a `Reverse<T>`.
//! [`Reverse`] simply wraps [`core::cmp::Reverse`] and implements all the required traits for use
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment