Add PyItem container
Also reduce queue item trait bound from Ord to just PartialOrd
This commit is contained in:
parent
ee004bac19
commit
38a544db76
8 changed files with 91 additions and 32 deletions
|
@ -3,7 +3,7 @@ mod binary_heap;
|
|||
pub use binary_heap::BinaryHeap;
|
||||
|
||||
/// A data structure usable for backing a "pure" queue
|
||||
pub trait PureBacking<T: Ord + Send + Sync>: Send + Sync {
|
||||
pub trait PureBacking<T: PartialOrd + Send + Sync>: Send + Sync {
|
||||
/// Places an item into the queue
|
||||
fn add(&mut self, item: T);
|
||||
/// Removes the item with minimum priority, if it exists
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue