From c23a457e72abe608715ac76f076f47dc42af07a5 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 20:31:44 +0200 Subject: Merging upstream version 1.74.1+dfsg1. Signed-off-by: Daniel Baumann --- library/core/src/net/ip_addr.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'library/core/src/net') diff --git a/library/core/src/net/ip_addr.rs b/library/core/src/net/ip_addr.rs index 56460c75e..6a36dfec0 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)] -- cgit v1.2.3