diff options
| author | bors <bors@rust-lang.org> | 2014-02-25 06:41:36 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-02-25 06:41:36 -0800 |
| commit | 25d68366b73c24bd9b7d277b38da087420d63f9b (patch) | |
| tree | 20978b14ec9da96f64fbd7659d090c04e99d300d /src/libstd | |
| parent | d222f03f42fe855d2fadc87010453bcfc2a669e1 (diff) | |
| parent | 6335a76b6eb473ea399b16fe9309db142d6b68ce (diff) | |
| download | rust-25d68366b73c24bd9b7d277b38da087420d63f9b.tar.gz rust-25d68366b73c24bd9b7d277b38da087420d63f9b.zip | |
auto merge of #12522 : erickt/rust/hash, r=alexcrichton
This patch series does a couple things: * replaces manual `Hash` implementations with `#[deriving(Hash)]` * adds `Hash` back to `std::prelude` * minor cleanup of whitespace and variable names.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/ascii.rs | 10 | ||||
| -rw-r--r-- | src/libstd/io/net/ip.rs | 1 | ||||
| -rw-r--r-- | src/libstd/lib.rs | 1 |
3 files changed, 1 insertions, 11 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 diff --git a/src/libstd/io/net/ip.rs b/src/libstd/io/net/ip.rs index f67ba8fce03..d112b504c98 100644 --- a/src/libstd/io/net/ip.rs +++ b/src/libstd/io/net/ip.rs @@ -55,7 +55,6 @@ pub struct SocketAddr { port: Port, } - impl fmt::Show for SocketAddr { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self.ip { diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index e96eedea5cb..d38daf68cbc 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -151,7 +151,6 @@ pub mod container; pub mod default; pub mod any; - /* Common data structures */ pub mod option; |
