Merge pull request #67 from jbcrail/replace-range
Replace deprecated range function.
This commit is contained in:
commit
bc9698c504
|
@ -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