Remove impl Ord/PartialOrd for Cidr.

It's not obvious that CIDRs are ordered in any particular meaningful
way.
This commit is contained in:
whitequark 2017-11-09 01:50:34 +00:00
parent adb5014780
commit 65c8aea921
2 changed files with 2 additions and 2 deletions

View File

@ -136,7 +136,7 @@ impl fmt::Display for Address {
/// A specification of a CIDR block, containing an address and a variable-length
/// subnet masking prefix length.
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Cidr {
Ipv4(Ipv4Cidr),
#[doc(hidden)]

View File

@ -80,7 +80,7 @@ impl fmt::Display for Address {
/// A specification of an IPv4 CIDR block, containing an address and a variable-length
/// subnet masking prefix length.
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Default)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub struct Cidr {
address: Address,
prefix_len: u8,