Remove special cases that are no longer needed due to #112606
This commit is contained in:
parent
4354192429
commit
5e76e20d71
@ -1856,13 +1856,7 @@ impl fmt::Display for Ipv6Addr {
|
|||||||
if f.precision().is_none() && f.width().is_none() {
|
if f.precision().is_none() && f.width().is_none() {
|
||||||
let segments = self.segments();
|
let segments = self.segments();
|
||||||
|
|
||||||
// Special case for :: and ::1; otherwise they get written with the
|
if let Some(ipv4) = self.to_ipv4_mapped() {
|
||||||
// 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() {
|
|
||||||
write!(f, "::ffff:{}", ipv4)
|
write!(f, "::ffff:{}", ipv4)
|
||||||
} else {
|
} else {
|
||||||
#[derive(Copy, Clone, Default)]
|
#[derive(Copy, Clone, Default)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user