mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 08:05:12 +00:00
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
@ -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…
Reference in New Issue
Block a user