pub fn compare_ips(a: IpAddr, b: IpAddr) -> Option<Ordering> {
    Some(match a {
        IpAddr::V4(a) => match b {
            IpAddr::V4(b) => a.cmp(&b),
            IpAddr::V6(_) => return None,
        },
        IpAddr::V6(a) => match b {
            IpAddr::V4(_) => return None,
            IpAddr::V6(b) => a.cmp(&b),
        },
    })
}
/// Compare the two given IP addresses, returning the ordering between them. If
/// the given IP addresses are not of the same type (V4/V6), returns None
/// instead.
Compare the two given IP addresses, returning the ordering between them. If
the given IP addresses are not of the same type (V4/V6), returns None
instead.
Compare the two given IP addresses returning the ordering between them . If the given IP addresses are not of the same type ( V4 / V6 ) returns None instead .
pub fn compare_ips(a: IpAddr, b: IpAddr) -> Option<Ordering> {
    Some(match a {
        IpAddr::V4(a) => match b {
            IpAddr::V4(b) => a.cmp(&b),
            IpAddr::V6(_) => return None,
        },
        IpAddr::V6(a) => match b {
            IpAddr::V4(_) => return None,
            IpAddr::V6(b) => a.cmp(&b),
        },
    })
}
pub fn compare_ips ( a : IpAddr , b : IpAddr ) -> Option < Ordering > { Some ( match a { IpAddr :: V4 ( a ) => match b { IpAddr :: V4 ( b ) => a . cmp ( & b ) , IpAddr :: V6 ( _ ) => return None , } , IpAddr :: V6 ( a ) => match b { IpAddr :: V4 ( _ ) => return None , IpAddr :: V6 ( b ) => a . cmp ( & b ) , } , } ) }
Compare the two given IP addresses, returning the ordering between them.
Compare the two given IP addresses returning the ordering between them .
a
IpAddr
b
IpAddr
a
IpAddr
b
IpAddr