From 4d6b7b318002108a1a97a626cd1bf7bb76c6db6b Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Sun, 28 Feb 2021 10:49:53 +0800 Subject: [PATCH] feat: ip address support ord, eq --- .gitignore | 1 + Cargo.toml | 2 +- src/util_net.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8780e93..dd2c961 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Generated by Cargo # will have compiled files and executables target/ +.idea/ Cargo.lock # These are backup files generated by rustfmt diff --git a/Cargo.toml b/Cargo.toml index d36b088..62302ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rust_util" -version = "0.6.29" +version = "0.6.30" authors = ["Hatter Jiang "] edition = "2018" description = "Hatter's Rust Util" diff --git a/src/util_net.rs b/src/util_net.rs index dc624fe..02e0d61 100644 --- a/src/util_net.rs +++ b/src/util_net.rs @@ -5,7 +5,7 @@ use crate::XResult; const DEFAULT_LISTEN_ADDR: [u8; 4] = [127, 0, 0, 1]; -#[derive(Debug, Clone)] +#[derive(Debug, Clone, PartialOrd, PartialEq, Ord, Eq)] pub enum IpAddress { Ipv4([u8; 4]), }