From 514f7a108f97fd6c11dc17f5a295924413dd1d28 Mon Sep 17 00:00:00 2001 From: Ben Savage Date: Tue, 19 Mar 2024 01:36:24 +1000 Subject: [PATCH] clippy --- .../ipa_prf/malicious_security/verifier.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ipa-core/src/protocol/ipa_prf/malicious_security/verifier.rs b/ipa-core/src/protocol/ipa_prf/malicious_security/verifier.rs index 08aa7b5a0..812f30db0 100644 --- a/ipa-core/src/protocol/ipa_prf/malicious_security/verifier.rs +++ b/ipa-core/src/protocol/ipa_prf/malicious_security/verifier.rs @@ -31,7 +31,7 @@ where pub fn verify_proof<λ: ArrayLength>( &self, - zkp: ZeroKnowledgeProof>, + zkp: &ZeroKnowledgeProof>, r: F, ) -> (F, ProofVerifier) where @@ -78,7 +78,7 @@ where pub fn verify_final_proof<λ>( &self, - zkp: ZeroKnowledgeProof>, + zkp: &ZeroKnowledgeProof>, r: F, p_or_q_0: F, ) -> (F, F) @@ -154,7 +154,7 @@ mod test { // first iteration let zkp_1 = ZeroKnowledgeProof::::new(ZKP_1.map(|x| Fp31::try_from(x).unwrap())); - let (b_share_1, pv_2) = pv_1.verify_proof::(zkp_1, Fp31::try_from(R_1).unwrap()); + let (b_share_1, pv_2) = pv_1.verify_proof::(&zkp_1, Fp31::try_from(R_1).unwrap()); assert_eq!(b_share_1.as_u128(), EXPECTED_B_1); assert_eq!( pv_2.u_or_v.iter().map(Fp31::as_u128).collect::>(), @@ -165,7 +165,7 @@ mod test { // second iteration let zkp_2 = ZeroKnowledgeProof::::new(ZKP_2.map(|x| Fp31::try_from(x).unwrap())); - let (b_share_2, pv_3) = pv_2.verify_proof::(zkp_2, Fp31::try_from(R_2).unwrap()); + let (b_share_2, pv_3) = pv_2.verify_proof::(&zkp_2, Fp31::try_from(R_2).unwrap()); assert_eq!(b_share_2.as_u128(), EXPECTED_B_2); assert_eq!( pv_3.u_or_v.iter().map(Fp31::as_u128).collect::>(), @@ -177,7 +177,7 @@ mod test { let zkp_3 = ZeroKnowledgeProof::::new(ZKP_3.map(|x| Fp31::try_from(x).unwrap())); let (p_final, out_share) = pv_3.verify_final_proof::( - zkp_3, + &zkp_3, Fp31::try_from(R_3).unwrap(), Fp31::try_from(P_RANDOM_WEIGHT).unwrap(), ); @@ -224,7 +224,7 @@ mod test { // first iteration let zkp_1 = ZeroKnowledgeProof::::new(ZKP_1.map(|x| Fp31::try_from(x).unwrap())); - let (b_share_1, pv_2) = pv_1.verify_proof::(zkp_1, Fp31::try_from(R_1).unwrap()); + let (b_share_1, pv_2) = pv_1.verify_proof::(&zkp_1, Fp31::try_from(R_1).unwrap()); assert_eq!(b_share_1.as_u128(), EXPECTED_B_1); assert_eq!( pv_2.u_or_v.iter().map(Fp31::as_u128).collect::>(), @@ -235,7 +235,7 @@ mod test { // second iteration let zkp_2 = ZeroKnowledgeProof::::new(ZKP_2.map(|x| Fp31::try_from(x).unwrap())); - let (b_share_2, pv_3) = pv_2.verify_proof::(zkp_2, Fp31::try_from(R_2).unwrap()); + let (b_share_2, pv_3) = pv_2.verify_proof::(&zkp_2, Fp31::try_from(R_2).unwrap()); assert_eq!(b_share_2.as_u128(), EXPECTED_B_2); assert_eq!( pv_3.u_or_v.iter().map(Fp31::as_u128).collect::>(), @@ -247,7 +247,7 @@ mod test { let zkp_3 = ZeroKnowledgeProof::::new(ZKP_3.map(|x| Fp31::try_from(x).unwrap())); let (q_final, out_share) = pv_3.verify_final_proof::( - zkp_3, + &zkp_3, Fp31::try_from(R_3).unwrap(), Fp31::try_from(Q_RANDOM_WEIGHT).unwrap(), );