orlp / slotmap

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

Removing `Key` bound from struct definition #115

Open Stumblinbear opened 5 months ago

Stumblinbear commented 5 months ago

I'm not seeing any real reason for (for example) HopSlotMap to have a Key bound on the generic K. This is against the general Rust style guide as it leads to infectious where clauses, and prevents being generic over it in more permissive GATs without awkward workarounds.