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
If clippy could work out that Hash<Ty> and Hash<Borrow<Ty>> were different implementations it could at least warn. I don't know if it'd be able to dive into whether they did the same thing as different implementations though.
May 30, 2019 ยท 6:49 AM UTC

