From efaf4db24c92e119e26dc575ffd6bfd3b91fb87d Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Sun, 23 Feb 2014 21:29:35 +1100 Subject: Transition to new `Hash`, removing IterBytes and std::to_bytes. --- src/libstd/path/posix.rs | 8 ++++---- src/libstd/path/windows.rs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/libstd/path') diff --git a/src/libstd/path/posix.rs b/src/libstd/path/posix.rs index 9aaa86c4cfe..d1af612e0ec 100644 --- a/src/libstd/path/posix.rs +++ b/src/libstd/path/posix.rs @@ -15,11 +15,11 @@ use c_str::{CString, ToCStr}; use clone::Clone; use cmp::Eq; use from_str::FromStr; +use hash::{Hash, sip}; use iter::{AdditiveIterator, Extendable, Iterator, Map}; use option::{Option, None, Some}; use str; use str::Str; -use to_bytes::IterBytes; use vec; use vec::{CloneableVector, RevSplits, Splits, Vector, VectorVector, ImmutableEqVector, OwnedVector, ImmutableVector, OwnedCloneableVector}; @@ -88,10 +88,10 @@ impl ToCStr for Path { } } -impl IterBytes for Path { +impl Hash for Path { #[inline] - fn iter_bytes(&self, lsb0: bool, f: |buf: &[u8]| -> bool) -> bool { - self.repr.iter_bytes(lsb0, f) + fn hash(&self, s: &mut sip::SipState) { + self.repr.hash(s) } } diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index 972b7d178a1..8902ab2edd7 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -17,11 +17,11 @@ use clone::Clone; use container::Container; use cmp::Eq; use from_str::FromStr; +use hash::{Hash, sip}; use iter::{AdditiveIterator, DoubleEndedIterator, Extendable, Rev, Iterator, Map}; use option::{Option, Some, None}; use str; use str::{CharSplits, OwnedStr, Str, StrVector, StrSlice}; -use to_bytes::IterBytes; use vec::{Vector, OwnedVector, ImmutableVector}; use super::{contains_nul, BytesContainer, GenericPath, GenericPathUnsafe}; @@ -112,10 +112,10 @@ impl ToCStr for Path { } } -impl IterBytes for Path { +impl Hash for Path { #[inline] - fn iter_bytes(&self, lsb0: bool, f: |&[u8]| -> bool) -> bool { - self.repr.iter_bytes(lsb0, f) + fn hash(&self, s: &mut sip::SipState) { + self.repr.hash(s) } } -- cgit 1.4.1-3-g733a5