Skip to content

Commit

Permalink
address clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
srinathsetty committed May 4, 2024
1 parent e8fc0f1 commit 30ae7a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/provider/hyperkzg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,8 @@ mod tests {

// Change the proof and expect verification to fail
let mut bad_proof = proof.clone();
bad_proof.v[0] = bad_proof.v[1].clone();
let v1 = bad_proof.v[1].clone();
bad_proof.v[0].clone_from(&v1);
let mut verifier_transcript2 = Keccak256Transcript::new(b"TestEval");
assert!(EvaluationEngine::verify(
&vk,
Expand Down Expand Up @@ -808,7 +809,8 @@ mod tests {

// Change the proof and expect verification to fail
let mut bad_proof = proof.clone();
bad_proof.v[0] = bad_proof.v[1].clone();
let v1 = bad_proof.v[1].clone();
bad_proof.v[0].clone_from(&v1);
let mut verifier_tr2 = Keccak256Transcript::new(b"TestEval");
assert!(
EvaluationEngine::verify(&vk, &mut verifier_tr2, &C, &point, &eval, &bad_proof).is_err()
Expand Down
3 changes: 2 additions & 1 deletion src/r1cs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,8 @@ impl<E: Engine> RelaxedR1CSInstance<E> {
let mut r_instance = RelaxedR1CSInstance::default(ck, S);
r_instance.comm_W = instance.comm_W;
r_instance.u = E::Scalar::ONE;
r_instance.X = instance.X.clone();
r_instance.X.clone_from(&instance.X);

r_instance
}

Expand Down
2 changes: 1 addition & 1 deletion src/spartan/direct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ mod tests {
assert!(res.is_ok());

// set input to the next step
z_i = z_i_plus_one.clone();
z_i.clone_from(&z_i_plus_one);
}

// sanity: check the claimed output with a direct computation of the same
Expand Down

0 comments on commit 30ae7a8

Please sign in to comment.