Skip to content

Commit

Permalink
Lift the Default bound for the Circuit trait
Browse files Browse the repository at this point in the history
The `Compiler::compile` function keeps this bound since it actually
requires the circuit to have a `Default` implementation, but all other
functionality now works without said bound.

Resolves #715
  • Loading branch information
ureeves committed Dec 5, 2022
1 parent b765f44 commit aff90c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/composer/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use super::Composer;
/// Circuit implementation that can be proved by a Composer
///
/// The default implementation will be used to generate the proving arguments.
pub trait Circuit: Default {
pub trait Circuit {
/// Circuit definition
fn circuit<C>(&self, composer: &mut C) -> Result<(), Error>
where
Expand Down
2 changes: 1 addition & 1 deletion src/composer/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl Compiler {
label: &[u8],
) -> Result<(Prover<C>, Verifier<C>), Error>
where
C: Circuit,
C: Default + Circuit,
{
Self::compile_with_circuit(pp, label, &Default::default())
}
Expand Down

0 comments on commit aff90c1

Please sign in to comment.