Announcing binary-heap-plus 0.4.0 (flexible BinaryHeap and more!)

I recently received several PRs for binary-heap-plus and published v0.3.1 and v0.4.0 of the crate.

For most of people who don't know the crate, it's a folk of std::collections::BinaryHeap and adds extra features including:

  • Various heaps (max, min, sorted by closure, sorted by key, etc.)
    • Specific constructors: new(), new_min(), new_by(), new_by_key()
    • Generic consrtructor: from_vec_cmp()
  • into_iter_sorted() which returns values in right order.
    • If you ever surprised when you find into_iter() return values in arbitrary order, it's a feature for you!
  • replace_cmp() (and its unsafe cousin) which replaces comparator of the existing binary heap in place!

... and still maintains backward compatibility.

Hope it helps your project.


This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.