1
0
mirror of https://github.com/jht5945/rust_util.git synced 2025-12-27 15:40:03 +08:00

feat: ip address support ord, eq

This commit is contained in:
2021-02-28 10:49:53 +08:00
parent 4b39ac48fd
commit 4d6b7b3180
3 changed files with 3 additions and 2 deletions

1
.gitignore vendored
View File

@@ -1,6 +1,7 @@
# Generated by Cargo # Generated by Cargo
# will have compiled files and executables # will have compiled files and executables
target/ target/
.idea/
Cargo.lock Cargo.lock
# These are backup files generated by rustfmt # These are backup files generated by rustfmt

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "rust_util" name = "rust_util"
version = "0.6.29" version = "0.6.30"
authors = ["Hatter Jiang <jht5945@gmail.com>"] authors = ["Hatter Jiang <jht5945@gmail.com>"]
edition = "2018" edition = "2018"
description = "Hatter's Rust Util" description = "Hatter's Rust Util"

View File

@@ -5,7 +5,7 @@ use crate::XResult;
const DEFAULT_LISTEN_ADDR: [u8; 4] = [127, 0, 0, 1]; const DEFAULT_LISTEN_ADDR: [u8; 4] = [127, 0, 0, 1];
#[derive(Debug, Clone)] #[derive(Debug, Clone, PartialOrd, PartialEq, Ord, Eq)]
pub enum IpAddress { pub enum IpAddress {
Ipv4([u8; 4]), Ipv4([u8; 4]),
} }