Further expand clippy workspace lints

Achieves a notable amount of reduced async and clones.
This commit is contained in:
Luke Parker
2023-12-17 00:01:41 -05:00
parent ea3af28139
commit 065d314e2a
113 changed files with 596 additions and 724 deletions

View File

@@ -19,7 +19,7 @@ pub trait CiphersuitePromote<C2: Ciphersuite> {
fn promote(self) -> ThresholdKeys<C2>;
}
fn transcript<G: GroupEncoding>(key: G, i: Participant) -> RecommendedTranscript {
fn transcript<G: GroupEncoding>(key: &G, i: Participant) -> RecommendedTranscript {
let mut transcript = RecommendedTranscript::new(b"DKG Generator Promotion v0.2");
transcript.append_message(b"group_key", key.to_bytes());
transcript.append_message(b"participant", i.to_bytes());
@@ -79,7 +79,7 @@ where
share: C2::generator() * base.secret_share().deref(),
proof: DLEqProof::prove(
rng,
&mut transcript(base.core.group_key(), base.params().i),
&mut transcript(&base.core.group_key(), base.params().i),
&[C1::generator(), C2::generator()],
base.secret_share(),
),
@@ -105,7 +105,7 @@ where
proof
.proof
.verify(
&mut transcript(self.base.core.group_key(), i),
&mut transcript(&self.base.core.group_key(), i),
&[C1::generator(), C2::generator()],
&[original_shares[&i], proof.share],
)