From 25acfde39864304c902293328f3492871ad0cbc8 Mon Sep 17 00:00:00 2001 From: nham Date: Fri, 1 Aug 2014 16:05:03 -0400 Subject: [PATCH] collections: Implement Eq for DList, RingBuf, TreeMap, TreeSet --- src/libcollections/dlist.rs | 2 ++ src/libcollections/ringbuf.rs | 2 ++ src/libcollections/treemap.rs | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/src/libcollections/dlist.rs b/src/libcollections/dlist.rs index 5e3ce75eb958..e3bae4dfa94c 100644 --- a/src/libcollections/dlist.rs +++ b/src/libcollections/dlist.rs @@ -683,6 +683,8 @@ impl PartialEq for DList { } } +impl Eq for DList {} + impl PartialOrd for DList { fn partial_cmp(&self, other: &DList) -> Option { iter::order::partial_cmp(self.iter(), other.iter()) diff --git a/src/libcollections/ringbuf.rs b/src/libcollections/ringbuf.rs index 44b546f66568..1ce5b41ffb7e 100644 --- a/src/libcollections/ringbuf.rs +++ b/src/libcollections/ringbuf.rs @@ -452,6 +452,8 @@ impl PartialEq for RingBuf { } } +impl Eq for RingBuf {} + impl PartialOrd for RingBuf { fn partial_cmp(&self, other: &RingBuf) -> Option { iter::order::partial_cmp(self.iter(), other.iter()) diff --git a/src/libcollections/treemap.rs b/src/libcollections/treemap.rs index 5de23b42f5c7..7a4fe0652cda 100644 --- a/src/libcollections/treemap.rs +++ b/src/libcollections/treemap.rs @@ -173,6 +173,8 @@ impl PartialEq for TreeMap { } } +impl Eq for TreeMap {} + impl PartialOrd for TreeMap { #[inline] fn partial_cmp(&self, other: &TreeMap) -> Option { @@ -1010,6 +1012,8 @@ impl PartialEq for TreeSet { fn eq(&self, other: &TreeSet) -> bool { self.map == other.map } } +impl Eq for TreeSet {} + impl PartialOrd for TreeSet { #[inline] fn partial_cmp(&self, other: &TreeSet) -> Option {