Merge remote-tracking branch 'rntz/tuple-iterbytes'

Conflicts:
	src/libcore/to_bytes.rs
This commit is contained in:
Brian Anderson 2012-12-05 11:58:35 -08:00
commit 0b5877afb8

View File

@ -208,19 +208,22 @@ impl<A: IterBytes> &[A]: IterBytes {
impl<A: IterBytes, B: IterBytes> (A,B): IterBytes {
#[inline(always)]
pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
let &(ref a, ref b) = self;
a.iter_bytes(lsb0, f);
b.iter_bytes(lsb0, f);
match *self {
(ref a, ref b) => {
iter_bytes_2(a, b, lsb0, f);
}
}
}
}
impl<A: IterBytes, B: IterBytes, C: IterBytes> (A,B,C): IterBytes {
#[inline(always)]
pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
let &(ref a, ref b, ref c) = self;
a.iter_bytes(lsb0, f);
b.iter_bytes(lsb0, f);
c.iter_bytes(lsb0, f);
match *self {
(ref a, ref b, ref c) => {
iter_bytes_3(a, b, c, lsb0, f);
}
}
}
}