Skip to content

Commit 4e9645c

Browse files
committed
add Send bounds
1 parent 9d94d6d commit 4e9645c

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

crates/tlsn/src/prover/client/mpc.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ use tlsn_deap::Deap;
1919
use tokio::sync::Mutex;
2020
use tracing::{Span, debug, instrument, trace, warn};
2121

22-
pub(crate) type MpcFuture = Box<dyn Future<Output = Result<(Context, TlsTranscript), ProverError>>>;
22+
pub(crate) type MpcFuture =
23+
Box<dyn Future<Output = Result<(Context, TlsTranscript), ProverError>> + Send>;
2324

2425
type FinalizeFuture =
25-
Box<dyn Future<Output = Result<(InnerState, Context, TlsTranscript), ProverError>>>;
26+
Box<dyn Future<Output = Result<(InnerState, Context, TlsTranscript), ProverError>> + Send>;
2627

2728
pub(crate) struct MpcTlsClient {
2829
state: State,
@@ -40,20 +41,20 @@ enum State {
4041
},
4142
Busy {
4243
mpc: Pin<MpcFuture>,
43-
fut: Pin<Box<dyn Future<Output = Result<Box<InnerState>, ProverError>>>>,
44+
fut: Pin<Box<dyn Future<Output = Result<Box<InnerState>, ProverError>> + Send>>,
4445
},
4546
ClientClose {
4647
mpc: Pin<MpcFuture>,
47-
fut: Pin<Box<dyn Future<Output = Result<Box<InnerState>, ProverError>>>>,
48+
fut: Pin<Box<dyn Future<Output = Result<Box<InnerState>, ProverError>> + Send>>,
4849
},
4950
ServerClose {
5051
mpc: Pin<MpcFuture>,
51-
fut: Pin<Box<dyn Future<Output = Result<Box<InnerState>, ProverError>>>>,
52+
fut: Pin<Box<dyn Future<Output = Result<Box<InnerState>, ProverError>> + Send>>,
5253
},
5354
Closing {
5455
ctx: Context,
5556
transcript: Box<TlsTranscript>,
56-
fut: Pin<Box<dyn Future<Output = Result<Box<InnerState>, ProverError>>>>,
57+
fut: Pin<Box<dyn Future<Output = Result<Box<InnerState>, ProverError>> + Send>>,
5758
},
5859
Finalizing {
5960
fut: Pin<FinalizeFuture>,

crates/tlsn/src/prover/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub struct Connected {
4242
pub(crate) mux_ctrl: MuxControl,
4343
pub(crate) mux_fut: MuxFuture,
4444
pub(crate) server_name: ServerName,
45-
pub(crate) tls_client: Box<dyn TlsClient<Error = ProverError>>,
45+
pub(crate) tls_client: Box<dyn TlsClient<Error = ProverError> + Send>,
4646
pub(crate) output: Option<TlsOutput>,
4747
}
4848

0 commit comments

Comments
 (0)