diff --git a/src/libcore/to_bytes.rs b/src/libcore/to_bytes.rs index ef15aa00f1138..3aaa3ab8d9183 100644 --- a/src/libcore/to_bytes.rs +++ b/src/libcore/to_bytes.rs @@ -191,6 +191,25 @@ impl &[A]: IterBytes { } } +impl (A,B): IterBytes { + #[inline(always)] + pure fn iter_bytes(lsb0: bool, f: Cb) { + let &(ref a, ref b) = &self; + a.iter_bytes(lsb0, f); + b.iter_bytes(lsb0, f); + } +} + +impl (A,B,C): IterBytes { + #[inline(always)] + pure fn iter_bytes(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); + } +} + // Move this to vec, probably. pure fn borrow(a: &x/[A]) -> &x/[A] { a