소스 검색

Remove impl Ord/PartialOrd for Cidr.

It's not obvious that CIDRs are ordered in any particular meaningful
way.
whitequark 7 년 전
부모
커밋
19790720a3
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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,