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:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -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
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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]),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user