orlp / slotmap

Slotmap data structure for Rust
zlib License
1.16k stars 70 forks source link

Why Require Ord in RandMeldHeap Example? #71

Closed wyhinton closed 3 years ago

wyhinton commented 3 years ago

Hello,

Newbie here. I was wondering what the reasoning behind requiring Ord for T in RandMeldHeap?

orlp commented 3 years ago

Well, the point of a heap is to always return the minimal value. Without requiring Ord 'minimal value' has no meaning.