Skip to content

Commit

Permalink
stream: make Opening(Uni|Bi)Stream Send and Sync
Browse files Browse the repository at this point in the history
  • Loading branch information
BiagioFesta committed Jul 7, 2023
1 parent ce77eba commit 56378da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions wtransport/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ impl tokio::io::AsyncRead for RecvStream {
}
}

type DynFutureUniStream = dyn Future<Output = Result<SendStream, StreamOpeningError>>;
type DynFutureUniStream = dyn Future<Output = Result<SendStream, StreamOpeningError>> + Send + Sync;

/// [`Future`] for an in-progress opening unidirectional stream.
///
Expand Down Expand Up @@ -193,7 +193,8 @@ impl Future for OpeningUniStream {
}
}

type DynFutureBiStream = dyn Future<Output = Result<(SendStream, RecvStream), StreamOpeningError>>;
type DynFutureBiStream =
dyn Future<Output = Result<(SendStream, RecvStream), StreamOpeningError>> + Send + Sync;

/// [`Future`] for an in-progress opening bidirectional stream.
///
Expand Down

0 comments on commit 56378da

Please sign in to comment.