Reformat parse_ip_impl definition and calls
This commit is contained in:
parent
4c0dd63011
commit
d549f048e1
@ -1585,9 +1585,7 @@ map_impl! {
|
|||||||
|
|
||||||
#[cfg(any(feature = "std", not(no_core_net)))]
|
#[cfg(any(feature = "std", not(no_core_net)))]
|
||||||
macro_rules! parse_ip_impl {
|
macro_rules! parse_ip_impl {
|
||||||
(
|
($ty:ty, $expecting:expr, $size:tt) => {
|
||||||
$ty:ty, $expecting:expr, $size:tt
|
|
||||||
) => {
|
|
||||||
impl<'de> Deserialize<'de> for $ty {
|
impl<'de> Deserialize<'de> for $ty {
|
||||||
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
|
||||||
where
|
where
|
||||||
@ -1735,14 +1733,10 @@ impl<'de> Deserialize<'de> for net::IpAddr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "std", not(no_core_net)))]
|
#[cfg(any(feature = "std", not(no_core_net)))]
|
||||||
parse_ip_impl! {
|
parse_ip_impl!(net::Ipv4Addr, "IPv4 address", 4);
|
||||||
net::Ipv4Addr, "IPv4 address", 4
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(feature = "std", not(no_core_net)))]
|
#[cfg(any(feature = "std", not(no_core_net)))]
|
||||||
parse_ip_impl! {
|
parse_ip_impl!(net::Ipv6Addr, "IPv6 address", 16);
|
||||||
net::Ipv6Addr, "IPv6 address", 16
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(feature = "std", not(no_core_net)))]
|
#[cfg(any(feature = "std", not(no_core_net)))]
|
||||||
macro_rules! parse_socket_impl {
|
macro_rules! parse_socket_impl {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user