diff --git a/src/key.rs b/src/key.rs index 9a87de3..1de7681 100644 --- a/src/key.rs +++ b/src/key.rs @@ -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))) diff --git a/src/macros.rs b/src/macros.rs index 9c2b09a..dbe13a9 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -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))