Merge remote-tracking branch 'rntz/tuple-iterbytes'
Conflicts: src/libcore/to_bytes.rs
This commit is contained in:
commit
0b5877afb8
1 changed files with 10 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue