Pārlūkot izejas kodu

Remove impl Ord/PartialOrd for Cidr.

It's not obvious that CIDRs are ordered in any particular meaningful
way.
whitequark 7 gadi atpakaļ
vecāks
revīzija
19790720a3
2 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 1 1
      src/wire/ip.rs
  2. 1 1
      src/wire/ipv4.rs

+ 1 - 1
src/wire/ip.rs

@@ -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)]

+ 1 - 1
src/wire/ipv4.rs

@@ -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,