diff options
| author | Tobias Bucher <tobiasbucher5991@gmail.com> | 2023-08-25 03:54:28 +0200 |
|---|---|---|
| committer | Tobias Bucher <tobiasbucher5991@gmail.com> | 2023-08-25 03:54:28 +0200 |
| commit | 5e76e20d7168cf35f0aa08d34c1d7b78b5263228 (patch) | |
| tree | 358c3140b1203b9d3dab7e5b4e993d8a8591c4ee | |
| parent | 4354192429729d64f205e5021b6e793ea77e65c4 (diff) | |
| download | rust-5e76e20d7168cf35f0aa08d34c1d7b78b5263228.tar.gz rust-5e76e20d7168cf35f0aa08d34c1d7b78b5263228.zip | |
Remove special cases that are no longer needed due to #112606
| -rw-r--r-- | library/core/src/net/ip_addr.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/library/core/src/net/ip_addr.rs b/library/core/src/net/ip_addr.rs index 56460c75eba..6a36dfec098 100644 --- a/library/core/src/net/ip_addr.rs +++ b/library/core/src/net/ip_addr.rs @@ -1856,13 +1856,7 @@ impl fmt::Display for Ipv6Addr { if f.precision().is_none() && f.width().is_none() { let segments = self.segments(); - // Special case for :: and ::1; otherwise they get written with the - // IPv4 formatter - if self.is_unspecified() { - f.write_str("::") - } else if self.is_loopback() { - f.write_str("::1") - } else if let Some(ipv4) = self.to_ipv4_mapped() { + if let Some(ipv4) = self.to_ipv4_mapped() { write!(f, "::ffff:{}", ipv4) } else { #[derive(Copy, Clone, Default)] |
