kyren / gc-arena

Incremental garbage collection from safe Rust
Creative Commons Zero v1.0 Universal
436 stars 36 forks source link

add StaticCollect traits #89

Closed dragazo closed 7 months ago

dragazo commented 7 months ago

Just adds a few trait impls to StaticCollect:

Originally I was wanting Borrow<U> for StaticCollect<T> where T: Borrow<U> for (efficient) use as the key type in a BTreeMap, but this seems to be impossible due to the std blanket implementation of Borrow<T> for T. Rust really needs negative trait bounds... or at least a NotSame<T, U> trait or something... But I digress lol

kyren commented 7 months ago

LGTM, thank you!