Skip to content

Commit

Permalink
chore(docs): fix clippy warnings in examples (#712)
Browse files Browse the repository at this point in the history
  • Loading branch information
StackOverflowExcept1on authored Aug 5, 2024
1 parent c6c3f2f commit 067f393
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions frost-ed25519/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ let mut commitments_map = BTreeMap::new();
////////////////////////////////////////////////////////////////////////////

// In practice, each iteration of this loop will be executed by its respective participant.
for participant_index in 1..(min_signers as u16 + 1) {
for participant_index in 1..=min_signers {
let participant_identifier = participant_index.try_into().expect("should be nonzero");
let key_package = &key_packages[&participant_identifier];
// Generate one (1) nonce and one SigningCommitments instance for each
// participant, up to _threshold_.
# // ANCHOR: round1_commit
let (nonces, commitments) = frost::round1::commit(
key_packages[&participant_identifier].signing_share(),
key_package.signing_share(),
&mut rng,
);
# // ANCHOR_END: round1_commit
Expand Down
4 changes: 2 additions & 2 deletions frost-ed448/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ let mut commitments_map = BTreeMap::new();
////////////////////////////////////////////////////////////////////////////

// In practice, each iteration of this loop will be executed by its respective participant.
for participant_index in 1..(min_signers as u16 + 1) {
for participant_index in 1..=min_signers {
let participant_identifier = participant_index.try_into().expect("should be nonzero");
let key_package = &key_packages[&participant_identifier];
// Generate one (1) nonce and one SigningCommitments instance for each
// participant, up to _threshold_.
# // ANCHOR: round1_commit
let (nonces, commitments) = frost::round1::commit(
key_packages[&participant_identifier].signing_share(),
key_package.signing_share(),
&mut rng,
);
# // ANCHOR_END: round1_commit
Expand Down
4 changes: 2 additions & 2 deletions frost-p256/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ let mut commitments_map = BTreeMap::new();
////////////////////////////////////////////////////////////////////////////

// In practice, each iteration of this loop will be executed by its respective participant.
for participant_index in 1..(min_signers as u16 + 1) {
for participant_index in 1..=min_signers {
let participant_identifier = participant_index.try_into().expect("should be nonzero");
let key_package = &key_packages[&participant_identifier];
// Generate one (1) nonce and one SigningCommitments instance for each
// participant, up to _threshold_.
# // ANCHOR: round1_commit
let (nonces, commitments) = frost::round1::commit(
key_packages[&participant_identifier].signing_share(),
key_package.signing_share(),
&mut rng,
);
# // ANCHOR_END: round1_commit
Expand Down
4 changes: 2 additions & 2 deletions frost-ristretto255/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ let mut commitments_map = BTreeMap::new();
////////////////////////////////////////////////////////////////////////////

// In practice, each iteration of this loop will be executed by its respective participant.
for participant_index in 1..(min_signers as u16 + 1) {
for participant_index in 1..=min_signers {
let participant_identifier = participant_index.try_into().expect("should be nonzero");
let key_package = &key_packages[&participant_identifier];
// Generate one (1) nonce and one SigningCommitments instance for each
// participant, up to _threshold_.
# // ANCHOR: round1_commit
let (nonces, commitments) = frost::round1::commit(
key_packages[&participant_identifier].signing_share(),
key_package.signing_share(),
&mut rng,
);
# // ANCHOR_END: round1_commit
Expand Down
4 changes: 2 additions & 2 deletions frost-secp256k1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ let mut commitments_map = BTreeMap::new();
////////////////////////////////////////////////////////////////////////////

// In practice, each iteration of this loop will be executed by its respective participant.
for participant_index in 1..(min_signers as u16 + 1) {
for participant_index in 1..=min_signers {
let participant_identifier = participant_index.try_into().expect("should be nonzero");
let key_package = &key_packages[&participant_identifier];
// Generate one (1) nonce and one SigningCommitments instance for each
// participant, up to _threshold_.
# // ANCHOR: round1_commit
let (nonces, commitments) = frost::round1::commit(
key_packages[&participant_identifier].signing_share(),
key_package.signing_share(),
&mut rng,
);
# // ANCHOR_END: round1_commit
Expand Down

0 comments on commit 067f393

Please sign in to comment.