summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorErick Tryzelaar <erick.tryzelaar@gmail.com>2014-02-23 18:50:47 -0800
committerErick Tryzelaar <erick.tryzelaar@gmail.com>2014-02-24 19:52:29 -0800
commit848cbb4e130d7ec9609b36b3f6f7a68099cbd6a7 (patch)
treef6df18a5992fd3d21638f3cb957c4a5a01505348 /src/libstd
parentf12ff1964b3040c426263d52472a9ed503c6a4aa (diff)
downloadrust-848cbb4e130d7ec9609b36b3f6f7a68099cbd6a7.tar.gz
rust-848cbb4e130d7ec9609b36b3f6f7a68099cbd6a7.zip
replace manual Hash impls with `#[deriving(Hash)]`
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/ascii.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/libstd/ascii.rs b/src/libstd/ascii.rs
index ac24a02c15b..d7b6ab25078 100644
--- a/src/libstd/ascii.rs
+++ b/src/libstd/ascii.rs
@@ -18,13 +18,12 @@ use str::OwnedStr;
 use container::Container;
 use cast;
 use fmt;
-use hash::{Hash, sip};
 use iter::Iterator;
 use vec::{ImmutableVector, MutableVector, Vector};
 use option::{Option, Some, None};
 
 /// Datatype to hold one ascii character. It wraps a `u8`, with the highest bit always zero.
-#[deriving(Clone, Eq, Ord, TotalOrd, TotalEq)]
+#[deriving(Clone, Eq, Ord, TotalOrd, TotalEq, Hash)]
 pub struct Ascii { priv chr: u8 }
 
 impl Ascii {
@@ -306,13 +305,6 @@ impl IntoStr for ~[Ascii] {
     }
 }
 
-impl Hash for Ascii {
-    #[inline]
-    fn hash(&self, s: &mut sip::SipState) {
-        self.to_byte().hash(s)
-    }
-}
-
 /// Trait to convert to an owned byte array by consuming self
 pub trait IntoBytes {
     /// Converts to an owned byte array by consuming self