Rust tip: if you implement `Borrow<B>` and `Hash` for a type `Ty`, then for all `x: Ty`, `hash(x) == hash(x.borrow())` must be true. If this property does not hold, then objects of type `Ty` won't work properly with hashmaps.
1
1
27
sounds like a job for a borrow test macro or some such to assert the invariant
May 30, 2019 ยท 6:04 AM UTC

