mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-28 03:07:24 +03:00
cd1b42c3e9
Hash Ipv*Addr as an integer The `Ipv4Addr` and `Ipv6Addr` structs always have a fixed size, but directly derive `Hash`. This causes them to call the bytestring hasher implementation, which adds extra work for most hashers. This PR converts the internal representation to a fixed-width integer before passing to the hasher to prevent this.