Replace usage of deprecated bigint crate. (#1214)

This commit is contained in:
Roman Borschel
2019-08-07 08:51:48 +02:00
committed by Pierre Krieger
parent 757e800117
commit bcfb647e65
3 changed files with 9 additions and 5 deletions

View File

@@ -128,7 +128,7 @@ impl BucketIndex {
let lower = usize::pow(2, rem);
let upper = usize::pow(2, rem + 1);
bytes[31 - quot] = rng.gen_range(lower, upper) as u8;
Distance(bigint::U256::from(bytes))
Distance(U256::from(bytes))
}
}
@@ -477,7 +477,6 @@ where
#[cfg(test)]
mod tests {
use bigint::U256;
use super::*;
use libp2p_core::PeerId;
use quickcheck::*;