diff options
Diffstat (limited to 'src/libstd/net/ip.rs')
| -rw-r--r-- | src/libstd/net/ip.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/net/ip.rs b/src/libstd/net/ip.rs index fa256ce5086..7f9f3b91a60 100644 --- a/src/libstd/net/ip.rs +++ b/src/libstd/net/ip.rs @@ -658,7 +658,7 @@ impl Ipv4Addr { #[stable(feature = "ip_addr", since = "1.7.0")] impl fmt::Display for IpAddr { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { match self { IpAddr::V4(ip) => ip.fmt(fmt), IpAddr::V6(ip) => ip.fmt(fmt), @@ -682,7 +682,7 @@ impl From<Ipv6Addr> for IpAddr { #[stable(feature = "rust1", since = "1.0.0")] impl fmt::Display for Ipv4Addr { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { let octets = self.octets(); write!(fmt, "{}.{}.{}.{}", octets[0], octets[1], octets[2], octets[3]) } @@ -690,7 +690,7 @@ impl fmt::Display for Ipv4Addr { #[stable(feature = "rust1", since = "1.0.0")] impl fmt::Debug for Ipv4Addr { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { fmt::Display::fmt(self, fmt) } } @@ -1229,7 +1229,7 @@ impl Ipv6Addr { #[stable(feature = "rust1", since = "1.0.0")] impl fmt::Display for Ipv6Addr { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { match self.segments() { // We need special cases for :: and ::1, otherwise they're formatted // as ::0.0.0.[01] @@ -1276,7 +1276,7 @@ impl fmt::Display for Ipv6Addr { let (zeros_at, zeros_len) = find_zero_slice(&self.segments()); if zeros_len > 1 { - fn fmt_subslice(segments: &[u16], fmt: &mut fmt::Formatter) -> fmt::Result { + fn fmt_subslice(segments: &[u16], fmt: &mut fmt::Formatter<'_>) -> fmt::Result { if !segments.is_empty() { write!(fmt, "{:x}", segments[0])?; for &seg in &segments[1..] { @@ -1301,7 +1301,7 @@ impl fmt::Display for Ipv6Addr { #[stable(feature = "rust1", since = "1.0.0")] impl fmt::Debug for Ipv6Addr { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { fmt::Display::fmt(self, fmt) } } |
