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 Sep 30, 2023
1 parent aa36bca commit 2bb000a
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 2bb000a

Please sign in to comment.