for in range(a,b) -> for in a..b
This commit is contained in:
parent
d0519f0b3a
commit
825e77519f
|
@ -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)))
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue