Enhancement over Rust's
std::collections::BinaryHeap
.
It supports the following heaps and still maintains backward compatibility.
BinaryHeap::new()
or ::with_capacity()
BinaryHeap::new_min()
or ::with_capacity_min()
BinaryHeap::new_by()
or ::with_capacity_by()
BinaryHeap::new_by_key()
or ::with_capacity_by_key()
Other notable added methods are:
BinaryHeap::from_vec_cmp()
and BinaryHeap::from_vec()
for more generic construction..into_iter_sorted()
which is less-surprising version of .into_iter()
. The implementation is backported from std
..replace_cmp()
which replace the comparator of the existing heap.This crate is based on the standard library's implementation of
BinaryHeap
from Rust 1.62.0.
The minimum supported Rust version is 1.56.0.
See CHANGELOG.md.
serde1
.unsafe
perf optimization.See the following discussions for the background of the crate: