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 798680a commit 312cdb4Copy full SHA for 312cdb4
src/libstd/net/ip.rs
@@ -587,8 +587,7 @@ impl Ipv4Addr {
587
/// ```
588
#[stable(since = "1.7.0", feature = "ip_17")]
589
pub fn is_broadcast(&self) -> bool {
590
- self.octets()[0] == 255 && self.octets()[1] == 255 &&
591
- self.octets()[2] == 255 && self.octets()[3] == 255
+ self == &Self::BROADCAST
592
}
593
594
/// Returns [`true`] if this address is in a range designated for documentation.
0 commit comments