Skip to content

Remove unnecessary mut in PodSigner trait#340

Merged
ed255 merged 1 commit intomainfrom
feat/no-unnecessary-mut
Jul 15, 2025
Merged

Remove unnecessary mut in PodSigner trait#340
ed255 merged 1 commit intomainfrom
feat/no-unnecessary-mut

Conversation

@ed255
Copy link
Collaborator

@ed255 ed255 commented Jul 14, 2025

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

Built on top of #339

@ed255 ed255 force-pushed the feat/no-unnecessary-mut branch from 877d979 to b75059b Compare July 14, 2025 13:14
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`
@ed255 ed255 force-pushed the feat/no-unnecessary-mut branch from b75059b to 6959335 Compare July 15, 2025 10:14
@ed255 ed255 requested a review from arnaucube July 15, 2025 10:14
@ed255 ed255 merged commit 63a716e into main Jul 15, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants