sekineh / binary-heap-plus-rs

Enhancement over Rust's `std::collections::BinaryHeap`. Supports other than max heap.
MIT License
57 stars 18 forks source link

Do not require T: Ord when a custom comparator is provided #1

Closed ulysseB closed 6 years ago

ulysseB commented 6 years ago

BinaryHeap::new_by and BinaryHeap::with_capacity_by require T: Ord while it is not needed. This just remove the constraint so we can we custom comparators with types that do not implement Ord.

sekineh commented 6 years ago

You are right, T: Ord is not required there.

I tried to remove T: Ord constraint where applicable, but I didn’t notice that line!

sekineh commented 6 years ago

I’ll publish the new crate later!

sekineh commented 6 years ago

Hi, I've just published the v0.1.4 to the crates.io.

ulysseB commented 6 years ago

That was quick :). Thanks a lot !