Skip to content

Commit 997e771

Browse files
committed
Provide Send Futures
This would be better with rust-lang/rust#63063
1 parent cb596f0 commit 997e771

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/multiplex/client.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ where
8181
NT::Item: 'static + Send,
8282
NT::SinkError: 'static + Send + Sync,
8383
NT::Error: 'static + Send + Sync,
84-
NT::Future: 'static,
84+
NT::Future: 'static + Send,
8585
{
8686
type Error = SpawnError<NT::MakeError>;
8787
type Response = Client<NT::Transport, Error<NT::Transport, Request>, Request>;
88-
type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>>>>;
88+
type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send>>;
8989

9090
fn call(&mut self, target: Target) -> Self::Future {
9191
let maker = self.t_maker.make_transport(target);
@@ -349,7 +349,7 @@ where
349349
{
350350
type Response = T::Ok;
351351
type Error = E;
352-
type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>>>>;
352+
type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send>>;
353353

354354
fn poll_ready(&mut self, cx: &mut Context) -> Poll<Result<(), E>> {
355355
Poll::Ready(ready!(self.mediator.poll_ready(cx)).map_err(|_| E::from(Error::ClientDropped)))

src/pipeline/client.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ where
6060
NT::Item: 'static + Send,
6161
NT::SinkError: 'static + Send + Sync,
6262
NT::Error: 'static + Send + Sync,
63-
NT::Future: 'static,
63+
NT::Future: 'static + Send,
6464
{
6565
type Error = SpawnError<NT::MakeError>;
6666
type Response = Client<NT::Transport, Error<NT::Transport, Request>, Request>;
67-
type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>>>>;
67+
type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send>>;
6868

6969
fn call(&mut self, target: Target) -> Self::Future {
7070
let maker = self.t_maker.make_transport(target);
@@ -308,7 +308,7 @@ where
308308
{
309309
type Response = T::Ok;
310310
type Error = E;
311-
type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>>>>;
311+
type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send>>;
312312

313313
fn poll_ready(&mut self, cx: &mut Context) -> Poll<Result<(), E>> {
314314
Poll::Ready(ready!(self.mediator.poll_ready(cx)).map_err(|_| E::from(Error::ClientDropped)))

0 commit comments

Comments
 (0)