1
Fork 0

Migrate core::send_map to random, keyed hashes w/ hash::Hash trait.

This commit is contained in:
Graydon Hoare 2012-08-30 19:01:22 -07:00
parent 3462bb6a46
commit 536cb90a21
6 changed files with 56 additions and 55 deletions

View file

@ -290,6 +290,19 @@ impl<A: IterBytes> ~A: IterBytes {
}
}
// NB: raw-pointer IterBytes does _not_ dereference
// to the target; it just gives you the pointer-bytes.
impl<A> *A: IterBytes {
#[inline(always)]
fn iter_le_bytes(f: Cb) {
(self as uint).iter_le_bytes(f);
}
#[inline(always)]
fn iter_be_bytes(f: Cb) {
(self as uint).iter_be_bytes(f);
}
}
trait ToBytes {
fn to_le_bytes() -> ~[u8];