We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 058699d commit e6dc604Copy full SHA for e6dc604
library/std/src/net/ip.rs
@@ -456,10 +456,7 @@ impl Ipv4Addr {
456
#[rustc_const_unstable(feature = "const_ipv4", issue = "76205")]
457
#[stable(since = "1.7.0", feature = "ip_17")]
458
pub const fn is_link_local(&self) -> bool {
459
- match self.octets() {
460
- [169, 254, ..] => true,
461
- _ => false,
462
- }
+ matches!(self.octets(), [169, 254, ..])
463
}
464
465
/// Returns [`true`] if the address appears to be globally routable.
0 commit comments