Skip to content

Commit 0b5877a

Browse files
committed
Merge remote-tracking branch 'rntz/tuple-iterbytes'
Conflicts: src/libcore/to_bytes.rs
2 parents 3440482 + 5b6c1a2 commit 0b5877a

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/libcore/to_bytes.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -208,19 +208,22 @@ impl<A: IterBytes> &[A]: IterBytes {
208208
impl<A: IterBytes, B: IterBytes> (A,B): IterBytes {
209209
#[inline(always)]
210210
pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
211-
let &(ref a, ref b) = self;
212-
a.iter_bytes(lsb0, f);
213-
b.iter_bytes(lsb0, f);
211+
match *self {
212+
(ref a, ref b) => {
213+
iter_bytes_2(a, b, lsb0, f);
214+
}
215+
}
214216
}
215217
}
216218

217219
impl<A: IterBytes, B: IterBytes, C: IterBytes> (A,B,C): IterBytes {
218220
#[inline(always)]
219221
pure fn iter_bytes(&self, lsb0: bool, f: Cb) {
220-
let &(ref a, ref b, ref c) = self;
221-
a.iter_bytes(lsb0, f);
222-
b.iter_bytes(lsb0, f);
223-
c.iter_bytes(lsb0, f);
222+
match *self {
223+
(ref a, ref b, ref c) => {
224+
iter_bytes_3(a, b, c, lsb0, f);
225+
}
226+
}
224227
}
225228
}
226229

0 commit comments

Comments
 (0)