Skip to content

Commit

Permalink
Fix clippy issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvc94ch committed Aug 28, 2023
1 parent 59acb0f commit 0345633
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frost-core/src/frost/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub(crate) fn compute_public_key<C: Ciphersuite>(
) -> VerifyingKey<C> {
let mut group_public = <C::Group>::identity();
for commitment in commitments.values() {
group_public = group_public + commitment.first().unwrap().value();
group_public = group_public + commitment.first().expect("valid commitments").value();
}
VerifyingKey {
element: group_public,
Expand Down
4 changes: 2 additions & 2 deletions frost-core/src/frost/keys/dkg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ pub fn part3<C: Ciphersuite>(
let signing_share = SigningShare(signing_share);

let commitments = round1_packages
.into_iter()
.iter()
.map(|(peer, package)| (*peer, package.commitment.clone()))
.chain(iter::once((
round2_secret_package.identifier,
Expand All @@ -463,7 +463,7 @@ pub fn part3<C: Ciphersuite>(
public: *public_key_package
.signer_pubkeys
.get(&round2_secret_package.identifier)
.unwrap(),
.expect("round2_secret_package.commitment is in the hashmap"),
group_public: public_key_package.group_public,
ciphersuite: (),
};
Expand Down
1 change: 1 addition & 0 deletions frost-ristretto255/tests/common_traits_tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#![cfg(feature = "serde")]
#![allow(clippy::unnecessary_literal_unwrap)]

mod helpers;

Expand Down

0 comments on commit 0345633

Please sign in to comment.