Use is_unicast instead of `!is_multicast

This commit is contained in:
Christiaan Dirkx 2021-05-31 09:57:43 +02:00
parent 7f27b29fd4
commit 187b415450

View File

@ -1445,7 +1445,7 @@ impl Ipv6Addr {
#[unstable(feature = "ip", issue = "27709")]
#[inline]
pub const fn is_unicast_global(&self) -> bool {
!self.is_multicast()
self.is_unicast()
&& !self.is_loopback()
&& !self.is_unicast_link_local()
&& !self.is_unique_local()