1
Fork 0

std: Use do blocks instead of for with .iter_bytes()

This commit is contained in:
blake2-ppc 2013-07-31 21:07:44 +02:00
parent 18d124b9b5
commit 6d7a0c8cbc
2 changed files with 49 additions and 33 deletions

View file

@ -353,9 +353,10 @@ pub trait ToBytes {
impl<A:IterBytes> ToBytes for A {
fn to_bytes(&self, lsb0: bool) -> ~[u8] {
do io::with_bytes_writer |wr| {
for self.iter_bytes(lsb0) |bytes| {
wr.write(bytes)
}
do self.iter_bytes(lsb0) |bytes| {
wr.write(bytes);
true
};
}
}
}