for in range(a,b) -> for in a..b

This commit is contained in:
Andrew Poelstra 2015-03-25 14:41:02 -05:00
parent d0519f0b3a
commit 825e77519f
2 changed files with 3 additions and 3 deletions

View File

@ -403,7 +403,7 @@ impl Decodable for PublicKey {
unsafe {
use std::mem;
let mut ret: [u8; constants::UNCOMPRESSED_PUBLIC_KEY_SIZE] = mem::uninitialized();
for i in range(0, len) {
for i in 0..len {
ret[i] = try!(d.read_seq_elt(i, |d| Decodable::decode(d)));
}
Ok(PublicKey(PublicKeyData::Uncompressed(ret)))
@ -412,7 +412,7 @@ impl Decodable for PublicKey {
unsafe {
use std::mem;
let mut ret: [u8; constants::COMPRESSED_PUBLIC_KEY_SIZE] = mem::uninitialized();
for i in range(0, len) {
for i in 0..len {
ret[i] = try!(d.read_seq_elt(i, |d| Decodable::decode(d)));
}
Ok(PublicKey(PublicKeyData::Compressed(ret)))

View File

@ -103,7 +103,7 @@ macro_rules! impl_array_newtype {
unsafe {
use std::mem;
let mut ret: [$ty; $len] = mem::uninitialized();
for i in range(0, len) {
for i in 0..len {
ret[i] = try!(d.read_seq_elt(i, |d| Decodable::decode(d)));
}
Ok($thing(ret))