From cbe80a9752c86d44c677cc39adbbd58aee507b6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20F=C3=A4rnstrand?= Date: Fri, 10 Aug 2018 23:42:33 +0200 Subject: [PATCH] Replace _.. with just .. in slice pattern --- src/libstd/net/ip.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libstd/net/ip.rs b/src/libstd/net/ip.rs index 2038a7bf795..9a610cd7d6b 100644 --- a/src/libstd/net/ip.rs +++ b/src/libstd/net/ip.rs @@ -484,9 +484,9 @@ pub fn is_loopback(&self) -> bool { #[stable(since = "1.7.0", feature = "ip_17")] pub fn is_private(&self) -> bool { match self.octets() { - [10, _..] => true, - [172, b, _..] if b >= 16 && b <= 31 => true, - [192, 168, _..] => true, + [10, ..] => true, + [172, b, ..] if b >= 16 && b <= 31 => true, + [192, 168, ..] => true, _ => false, } } @@ -510,7 +510,7 @@ pub fn is_private(&self) -> bool { #[stable(since = "1.7.0", feature = "ip_17")] pub fn is_link_local(&self) -> bool { match self.octets() { - [169, 254, _..] => true, + [169, 254, ..] => true, _ => false, } }