We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 42857db + 5e76e20 commit 8e35b20Copy full SHA for 8e35b20
library/core/src/net/ip_addr.rs
@@ -1856,13 +1856,7 @@ impl fmt::Display for Ipv6Addr {
1856
if f.precision().is_none() && f.width().is_none() {
1857
let segments = self.segments();
1858
1859
- // Special case for :: and ::1; otherwise they get written with the
1860
- // IPv4 formatter
1861
- if self.is_unspecified() {
1862
- f.write_str("::")
1863
- } else if self.is_loopback() {
1864
- f.write_str("::1")
1865
- } else if let Some(ipv4) = self.to_ipv4_mapped() {
+ if let Some(ipv4) = self.to_ipv4_mapped() {
1866
write!(f, "::ffff:{}", ipv4)
1867
} else {
1868
#[derive(Copy, Clone, Default)]
0 commit comments