diff --git a/src/lib.rs b/src/lib.rs index d3ce225..2fcd318 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -205,7 +205,7 @@ mod tests { let rand_inst_witness_generator = |gens: &R1CSGens, I: &S| -> (S, R1CSInstance, R1CSWitness) { - let i0 = I.clone(); + let i0 = *I; // compute a satisfying (vars, X) tuple let (O, vars, X) = { @@ -226,14 +226,14 @@ mod tests { res.unwrap() }; let U = { - let comm_W = W.commit(&gens); + let comm_W = W.commit(gens); let res = R1CSInstance::new(&S, &comm_W, &X); assert!(res.is_ok()); res.unwrap() }; // check that generated instance is satisfiable - assert!(S.is_sat(&gens, &U, &W).is_ok()); + assert!(S.is_sat(gens, &U, &W).is_ok()); (O, U, W) }; diff --git a/src/pasta.rs b/src/pasta.rs index b3637ff..a7c13f0 100644 --- a/src/pasta.rs +++ b/src/pasta.rs @@ -78,7 +78,7 @@ impl ChallengeTrait for pallas::Scalar { impl CompressedGroup for ::Repr { type GroupElement = pallas::Point; fn decompress(&self) -> Option<::GroupElement> { - Some(Ep::from_bytes(&self).unwrap()) + Some(Ep::from_bytes(self).unwrap()) } fn as_bytes(&self) -> &[u8] { self