Skip to content

Commit

Permalink
fix(provers): fix types on trait implementors
Browse files Browse the repository at this point in the history
  • Loading branch information
petarvujovic98 committed Jul 17, 2024
1 parent f1af18d commit 866722d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions provers/risc0/driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl Prover for Risc0Prover {
input: GuestInput,
output: &GuestOutput,
config: &ProverConfig,
write: &mut dyn IdWrite,
write: Option<&mut dyn IdWrite>,
) -> ProverResult<Proof> {
let config = Risc0Param::deserialize(config.get("risc0").unwrap()).unwrap();

Expand Down Expand Up @@ -95,7 +95,7 @@ impl Prover for Risc0Prover {
Ok(Risc0Response { proof: journal }.into())
}

async fn cancel(key: &str, store: &mut dyn IdStore) -> ProverResult<()> {
async fn cancel(key: &str, store: Box<&mut dyn IdStore>) -> ProverResult<()> {
Ok(())
}
}
Expand Down
4 changes: 2 additions & 2 deletions provers/sgx/prover/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl Prover for SgxProver {
input: GuestInput,
_output: &GuestOutput,
config: &ProverConfig,
_store: &mut dyn IdWrite,
_store: Option<&mut dyn IdWrite>,
) -> ProverResult<Proof> {
let sgx_param = SgxParam::deserialize(config.get("sgx").unwrap()).unwrap();

Expand Down Expand Up @@ -148,7 +148,7 @@ impl Prover for SgxProver {
sgx_proof.map(|r| r.into())
}

async fn cancel(_proof_key: ProofKey, _read: &mut dyn IdStore) -> ProverResult<()> {
async fn cancel(_proof_key: ProofKey, _read: Box<&mut dyn IdStore>) -> ProverResult<()> {
Ok(())
}
}
Expand Down
4 changes: 2 additions & 2 deletions provers/sp1/driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl Prover for Sp1Prover {
input: GuestInput,
_output: &GuestOutput,
_config: &ProverConfig,
write: &mut dyn IdWrite,
write: Option<&mut dyn IdWrite>,
) -> ProverResult<Proof> {
// Write the input.
let mut stdin = SP1Stdin::new();
Expand Down Expand Up @@ -70,7 +70,7 @@ impl Prover for Sp1Prover {
.into())
}

async fn cancel(_key: &str, _store: &mut dyn IdStore) -> ProverResult<()> {
async fn cancel(_key: &str, _store: Box<&mut dyn IdStore>) -> ProverResult<()> {
Ok(())
}
}
Expand Down

0 comments on commit 866722d

Please sign in to comment.