Remove Not for IpAddr
This commit is contained in:
parent
46bb49acb5
commit
6b13950978
@ -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 {
|
macro_rules! bitop_impls {
|
||||||
($(
|
($(
|
||||||
$(#[$attr:meta])*
|
$(#[$attr:meta])*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user