From 866722d8e414e934453220f0c90a40fbc1b7dc04 Mon Sep 17 00:00:00 2001 From: Petar Vujovic Date: Wed, 17 Jul 2024 10:30:08 +0200 Subject: [PATCH] fix(provers): fix types on trait implementors --- provers/risc0/driver/src/lib.rs | 4 ++-- provers/sgx/prover/src/lib.rs | 4 ++-- provers/sp1/driver/src/lib.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/provers/risc0/driver/src/lib.rs b/provers/risc0/driver/src/lib.rs index d11b60c08..613f06514 100644 --- a/provers/risc0/driver/src/lib.rs +++ b/provers/risc0/driver/src/lib.rs @@ -54,7 +54,7 @@ impl Prover for Risc0Prover { input: GuestInput, output: &GuestOutput, config: &ProverConfig, - write: &mut dyn IdWrite, + write: Option<&mut dyn IdWrite>, ) -> ProverResult { let config = Risc0Param::deserialize(config.get("risc0").unwrap()).unwrap(); @@ -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(()) } } diff --git a/provers/sgx/prover/src/lib.rs b/provers/sgx/prover/src/lib.rs index f275dd676..7b82f0e2c 100644 --- a/provers/sgx/prover/src/lib.rs +++ b/provers/sgx/prover/src/lib.rs @@ -71,7 +71,7 @@ impl Prover for SgxProver { input: GuestInput, _output: &GuestOutput, config: &ProverConfig, - _store: &mut dyn IdWrite, + _store: Option<&mut dyn IdWrite>, ) -> ProverResult { let sgx_param = SgxParam::deserialize(config.get("sgx").unwrap()).unwrap(); @@ -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(()) } } diff --git a/provers/sp1/driver/src/lib.rs b/provers/sp1/driver/src/lib.rs index bb88ef961..b2e5445f4 100644 --- a/provers/sp1/driver/src/lib.rs +++ b/provers/sp1/driver/src/lib.rs @@ -32,7 +32,7 @@ impl Prover for Sp1Prover { input: GuestInput, _output: &GuestOutput, _config: &ProverConfig, - write: &mut dyn IdWrite, + write: Option<&mut dyn IdWrite>, ) -> ProverResult { // Write the input. let mut stdin = SP1Stdin::new(); @@ -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(()) } }