//! A priority queue implemented with a binary heap.
//!
+//! Insertions have `O(log n)` time complexity and checking or popping the largest element is
+//! `O(1)`. Converting a vector to a priority queue can be done in-place, and has `O(n)`
+//! complexity. A priority queue can also be converted to a sorted vector in-place, allowing it to
+//! be used for an `O(n log n)` in-place heapsort.
+//!
//! # Example
//!
//! This is a larger example which implements [Dijkstra's algorithm][dijkstra]
}
}
-/// Note: stage0-specific version that lacks bound on A.
-#[cfg(stage0)]
-pub struct Items <'a, T> {
- iter: slice::Items<'a, T>,
-}
-
/// `PriorityQueue` iterator.
-#[cfg(not(stage0))]
pub struct Items <'a, T:'a> {
iter: slice::Items<'a, T>,
}