diff options
| author | Michael Sullivan <sully@msully.net> | 2013-07-19 15:21:52 -0700 |
|---|---|---|
| committer | Michael Sullivan <sully@msully.net> | 2013-07-23 17:06:32 -0700 |
| commit | a0f8540c9571dadb9af542799156cc8a96263c41 (patch) | |
| tree | 7a4cac0e0f300e5973de4865f31d7c30787c0e2e /src/libstd | |
| parent | e75ec8015701d4a43ec2644dbbc4a2e051c4f515 (diff) | |
| download | rust-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.rs | 6 | ||||
| -rw-r--r-- | src/libstd/iterator.rs | 2 |
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() } } |
