Skip to content

Commit

Permalink
Remove Not for IpAddr
Browse files Browse the repository at this point in the history
  • Loading branch information
clarfonthey committed Oct 13, 2023
1 parent 46bb49a commit 6b13950
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions library/core/src/net/ip_addr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2171,29 +2171,6 @@ impl Not for &'_ Ipv6Addr {
}
}

#[stable(feature = "ip_bitops", since = "CURRENT_RUSTC_VERSION")]
impl Not for IpAddr {
type Output = IpAddr;

#[inline]
fn not(self) -> IpAddr {
match self {
IpAddr::V4(v4) => IpAddr::V4(!v4),
IpAddr::V6(v6) => IpAddr::V6(!v6),
}
}
}

#[stable(feature = "ip_bitops", since = "CURRENT_RUSTC_VERSION")]
impl Not for &'_ IpAddr {
type Output = IpAddr;

#[inline]
fn not(self) -> IpAddr {
!*self
}
}

macro_rules! bitop_impls {
($(
$(#[$attr:meta])*
Expand Down

0 comments on commit 6b13950

Please sign in to comment.