call out to iter_bytes_{2,3} in IterBytes instances for pairs, triples
This means we will exit early if requested based on the return value of the callback we're given.
This commit is contained in:
parent
ef2c404e01
commit
5b6c1a2950
1 changed files with 2 additions and 5 deletions
|
@ -196,8 +196,7 @@ impl<A: IterBytes, B: IterBytes> (A,B): IterBytes {
|
|||
pure fn iter_bytes(lsb0: bool, f: Cb) {
|
||||
match self {
|
||||
(ref a, ref b) => {
|
||||
a.iter_bytes(lsb0, f);
|
||||
b.iter_bytes(lsb0, f);
|
||||
iter_bytes_2(a, b, lsb0, f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -208,9 +207,7 @@ impl<A: IterBytes, B: IterBytes, C: IterBytes> (A,B,C): IterBytes {
|
|||
pure fn iter_bytes(lsb0: bool, f: Cb) {
|
||||
match self {
|
||||
(ref a, ref b, ref c) => {
|
||||
a.iter_bytes(lsb0, f);
|
||||
b.iter_bytes(lsb0, f);
|
||||
c.iter_bytes(lsb0, f);
|
||||
iter_bytes_3(a, b, c, lsb0, f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue