Remove unnecessary mut in PodSigner trait (#340)

The PodSigner trait was taking `&mut self` in the `sign` method, but the
signer doesn't need mutation in the Shcnorr implementation.  Remove the
`mut`.

Previously the PodProver trait was also taking `&mut self` in the
`prove` method, and we had many tests creating a `mut Prover/mut
MockProver`.  Remove all those `mut`.

Breaking change: `PodSigner` trait method `sign` replaces `&mut self` by
`&self`
This commit is contained in:
Eduard S. 2025-07-15 17:37:26 +02:00 committed by GitHub
parent b5e0d97cb6
commit 63a716ebd7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 136 additions and 146 deletions

View file

@ -219,8 +219,8 @@ pub mod tests {
pod.insert("dateOfBirth", 1169909384);
pod.insert("socialSecurityNumber", "G2121210");
let sk = SecretKey::new_rand();
let mut signer = Signer(sk);
let pod = pod.sign(&mut signer).unwrap();
let signer = Signer(sk);
let pod = pod.sign(&signer).unwrap();
let signed_pod = (pod.pod as Box<dyn Any>).downcast::<SignedPod>().unwrap();
// use the pod in the circuit