diff --git a/schnorr_fun/benches/bench_schnorr.rs b/schnorr_fun/benches/bench_schnorr.rs index 38d4989a..926f04f3 100755 --- a/schnorr_fun/benches/bench_schnorr.rs +++ b/schnorr_fun/benches/bench_schnorr.rs @@ -49,7 +49,7 @@ fn verify_schnorr(c: &mut Criterion) { }); { - let sig = sig.clone().set_secrecy::(); + let sig = sig.set_secrecy::(); group.bench_function("fun::schnorr_verify_ct", |b| { b.iter(|| schnorr.verify(verification_key, message, &sig)) }); diff --git a/schnorr_fun/src/frost/mod.rs b/schnorr_fun/src/frost/mod.rs index 3dc09cbf..1a535ca4 100644 --- a/schnorr_fun/src/frost/mod.rs +++ b/schnorr_fun/src/frost/mod.rs @@ -504,10 +504,7 @@ impl + Clone, NG: NonceGen> Frost { .map(|(gen_party_index, (party_shares, pop))| { ( *gen_party_index, - ( - party_shares.remove(receiver_party_index).unwrap(), - pop.clone(), - ), + (party_shares.remove(receiver_party_index).unwrap(), *pop), ) }) .collect::>(); diff --git a/schnorr_fun/src/signature.rs b/schnorr_fun/src/signature.rs index 0cfecfeb..fc519d78 100644 --- a/schnorr_fun/src/signature.rs +++ b/schnorr_fun/src/signature.rs @@ -1,7 +1,7 @@ use crate::fun::{marker::*, rand_core::RngCore, Point, Scalar}; /// A Schnorr signature. -#[derive(Clone, Eq)] +#[derive(Clone, Eq, Copy)] pub struct Signature { /// The signature's public nonce /// diff --git a/schnorr_fun/tests/frost_prop.rs b/schnorr_fun/tests/frost_prop.rs index 0079f81a..a27fe369 100644 --- a/schnorr_fun/tests/frost_prop.rs +++ b/schnorr_fun/tests/frost_prop.rs @@ -124,7 +124,7 @@ proptest! { signatures.values().cloned() ); - assert_eq!(proto.verify_and_combine_signature_shares(&xonly_shared_key, &coord_signing_session, signatures), Ok(combined_sig.clone())); + assert_eq!(proto.verify_and_combine_signature_shares(&xonly_shared_key, &coord_signing_session, signatures), Ok(combined_sig)); assert!(proto.schnorr.verify( &xonly_shared_key.public_key(), message,