about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-09-20 13:39:57 +0000
committerbors <bors@rust-lang.org>2015-09-20 13:39:57 +0000
commitaed5c3a1c876189c86dfb702bd7a73b209c87ae0 (patch)
tree48326cc61cd362530e319a93e81d17720572b39e /src/libstd/sys
parent25aaeb40b11a5983ed6000a8e466c08a701dfb99 (diff)
parent140e2d3a092ebbeea5e110222bea3b37bc49abb8 (diff)
downloadrust-aed5c3a1c876189c86dfb702bd7a73b209c87ae0.tar.gz
rust-aed5c3a1c876189c86dfb702bd7a73b209c87ae0.zip
Auto merge of #28532 - Eljay:misc-fixes, r=bluss
As the title says, just cleaning up some old stuff.
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/common/wtf8.rs32
1 files changed, 1 insertions, 31 deletions
diff --git a/src/libstd/sys/common/wtf8.rs b/src/libstd/sys/common/wtf8.rs
index 633e7d78a9a..10f77d0207c 100644
--- a/src/libstd/sys/common/wtf8.rs
+++ b/src/libstd/sys/common/wtf8.rs
@@ -31,7 +31,6 @@ use core::str::next_code_point;
 use ascii::*;
 use borrow::Cow;
 use char;
-use cmp;
 use fmt;
 use hash::{Hash, Hasher};
 use iter::FromIterator;
@@ -375,6 +374,7 @@ impl Extend<CodePoint> for Wtf8Buf {
 ///
 /// Similar to `&str`, but can additionally contain surrogate code points
 /// if they’re not in a surrogate pair.
+#[derive(Eq, Ord, PartialEq, PartialOrd)]
 pub struct Wtf8 {
     bytes: [u8]
 }
@@ -383,36 +383,6 @@ impl AsInner<[u8]> for Wtf8 {
     fn as_inner(&self) -> &[u8] { &self.bytes }
 }
 
-// FIXME: https://github.com/rust-lang/rust/issues/18805
-impl PartialEq for Wtf8 {
-    fn eq(&self, other: &Wtf8) -> bool { self.bytes.eq(&other.bytes) }
-}
-
-// FIXME: https://github.com/rust-lang/rust/issues/18805
-impl Eq for Wtf8 {}
-
-// FIXME: https://github.com/rust-lang/rust/issues/18738
-impl PartialOrd for Wtf8 {
-    #[inline]
-    fn partial_cmp(&self, other: &Wtf8) -> Option<cmp::Ordering> {
-        self.bytes.partial_cmp(&other.bytes)
-    }
-    #[inline]
-    fn lt(&self, other: &Wtf8) -> bool { self.bytes.lt(&other.bytes) }
-    #[inline]
-    fn le(&self, other: &Wtf8) -> bool { self.bytes.le(&other.bytes) }
-    #[inline]
-    fn gt(&self, other: &Wtf8) -> bool { self.bytes.gt(&other.bytes) }
-    #[inline]
-    fn ge(&self, other: &Wtf8) -> bool { self.bytes.ge(&other.bytes) }
-}
-
-// FIXME: https://github.com/rust-lang/rust/issues/18738
-impl Ord for Wtf8 {
-    #[inline]
-    fn cmp(&self, other: &Wtf8) -> cmp::Ordering { self.bytes.cmp(&other.bytes) }
-}
-
 /// Format the slice with double quotes,
 /// and surrogates as `\u` followed by four hexadecimal digits.
 /// Example: `"a\u{D800}"` for a slice with code points [U+0061, U+D800]