Merge branch 'tcpsteam_send' into 'main'
tor-rtcompat: Require that TcpStream be Send See merge request tpo/core/arti!675
This commit is contained in:
commit
8f81e22d88
|
@ -0,0 +1 @@
|
|||
BREAKING: We now require that the TcpStream type returned by listeners is Send.
|
|
@ -51,7 +51,7 @@ mod net {
|
|||
Ready(TcpListener),
|
||||
/// We've called `accept` on the listener, and we're waiting
|
||||
/// for a future to complete.
|
||||
Accepting(Pin<Box<dyn Future<Output = FResult>>>),
|
||||
Accepting(Pin<Box<dyn Future<Output = FResult> + Send>>),
|
||||
}
|
||||
impl IncomingStreams {
|
||||
/// Create a new IncomingStreams from a TcpListener.
|
||||
|
|
|
@ -172,7 +172,7 @@ pub trait TcpListener {
|
|||
type TcpStream: AsyncRead + AsyncWrite + Send + Sync + Unpin + 'static;
|
||||
|
||||
/// The type of [`stream::Stream`] returned by [`Self::incoming()`].
|
||||
type Incoming: stream::Stream<Item = IoResult<(Self::TcpStream, SocketAddr)>> + Unpin;
|
||||
type Incoming: stream::Stream<Item = IoResult<(Self::TcpStream, SocketAddr)>> + Send + Unpin;
|
||||
|
||||
/// Wait for an incoming stream; return it along with its address.
|
||||
async fn accept(&self) -> IoResult<(Self::TcpStream, SocketAddr)>;
|
||||
|
|
Loading…
Reference in New Issue