Skip to content

Commit

Permalink
Fix deprecated method and test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
iancoleman committed Mar 4, 2024
1 parent 30e9380 commit dc03c70
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "curv-kzen"
version = "0.10.0"
version = "0.10.1"
edition = "2018"
authors = [
"Omer Shlomovits",
Expand Down
3 changes: 2 additions & 1 deletion src/arithmetic/big_native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ impl Integer for BigInt {
}

fn divides(&self, other: &Self) -> bool {
self.num.divides(&other.num)
// num_bigint::bigint::divides is depricated
self.num.is_multiple_of(&other.num)
}

fn is_multiple_of(&self, other: &Self) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion src/arithmetic/big_native/primes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ fn is_bit_set(x: &BigUint, i: usize) -> bool {
fn gen_biguint_below<R: Rng>(r: &mut R, upper: &BigUint) -> BigUint {
loop {
let bits = upper.bits();
let bytes = bits.div_ceil(&8);
let bytes = bits.div_ceil(8);
let mut buf = vec![0u8; bytes as usize];
r.fill_bytes(&mut buf);

Expand Down

0 comments on commit dc03c70

Please sign in to comment.