Replace deprecated range function.
This commit is contained in:
parent
575cc09136
commit
5a0835d5d7
|
@ -1571,7 +1571,7 @@ impl<R: Rng> RandBigInt for R {
|
||||||
fn gen_biguint(&mut self, bit_size: usize) -> BigUint {
|
fn gen_biguint(&mut self, bit_size: usize) -> BigUint {
|
||||||
let (digits, rem) = bit_size.div_rem(&big_digit::BITS);
|
let (digits, rem) = bit_size.div_rem(&big_digit::BITS);
|
||||||
let mut data = Vec::with_capacity(digits+1);
|
let mut data = Vec::with_capacity(digits+1);
|
||||||
for _ in range(0, digits) {
|
for _ in (0 .. digits) {
|
||||||
data.push(self.gen());
|
data.push(self.gen());
|
||||||
}
|
}
|
||||||
if rem > 0 {
|
if rem > 0 {
|
||||||
|
|
Loading…
Reference in New Issue