Skip to content

Commit

Permalink
cargo clippy --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
survived committed Feb 28, 2024
1 parent 17f3f93 commit a4468fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions key-share/src/trusted_dealer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ impl<E: Curve> TrustedDealerBuilder<E> {
shared_public_key,
Point::generator() * f.value::<_, Scalar<_>>(&Scalar::zero())
);
let shares = key_shares_indexes

key_shares_indexes
.iter()
.map(|I_i| f.value(I_i))
.map(|mut x_i| SecretScalar::new(&mut x_i))
.map(|x| NonZero::from_secret_scalar(x).ok_or(Reason::ZeroShare))
.collect::<Result<Vec<_>, _>>()?;
shares
.collect::<Result<Vec<_>, _>>()?
} else {
let mut shares = std::iter::repeat_with(|| NonZero::<SecretScalar<E>>::random(rng))
.take((self.n - 1).into())
Expand Down

0 comments on commit a4468fa

Please sign in to comment.