about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorMichael Sullivan <sully@msully.net>2013-07-19 15:21:52 -0700
committerMichael Sullivan <sully@msully.net>2013-07-23 17:06:32 -0700
commita0f8540c9571dadb9af542799156cc8a96263c41 (patch)
tree7a4cac0e0f300e5973de4865f31d7c30787c0e2e /src/libstd
parente75ec8015701d4a43ec2644dbbc4a2e051c4f515 (diff)
downloadrust-a0f8540c9571dadb9af542799156cc8a96263c41.tar.gz
rust-a0f8540c9571dadb9af542799156cc8a96263c41.zip
Fix some impls such that all supertraits are actually implemented.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/cmp.rs6
-rw-r--r--src/libstd/iterator.rs2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/libstd/cmp.rs b/src/libstd/cmp.rs
index 8a13cab28c3..eee786524f5 100644
--- a/src/libstd/cmp.rs
+++ b/src/libstd/cmp.rs
@@ -86,6 +86,12 @@ pub trait TotalOrd: TotalEq {
     fn cmp(&self, other: &Self) -> Ordering;
 }
 
+impl TotalEq for Ordering {
+    #[inline]
+    fn equals(&self, other: &Ordering) -> bool {
+        *self == *other
+    }
+}
 impl TotalOrd for Ordering {
     #[inline]
     fn cmp(&self, other: &Ordering) -> Ordering {
diff --git a/src/libstd/iterator.rs b/src/libstd/iterator.rs
index 1aca34894b4..d7edf746f90 100644
--- a/src/libstd/iterator.rs
+++ b/src/libstd/iterator.rs
@@ -86,7 +86,7 @@ impl<A, T: DoubleEndedIterator<A>> Iterator<A> for InvertIterator<A, T> {
     fn size_hint(&self) -> (uint, Option<uint>) { self.iter.size_hint() }
 }
 
-impl<A, T: Iterator<A>> DoubleEndedIterator<A> for InvertIterator<A, T> {
+impl<A, T: DoubleEndedIterator<A>> DoubleEndedIterator<A> for InvertIterator<A, T> {
     #[inline]
     fn next_back(&mut self) -> Option<A> { self.iter.next() }
 }