File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
msg-transport/src/durable Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ use tokio::{
13
13
} ;
14
14
use tracing:: { debug, error} ;
15
15
16
- pub type PendingIo < Io > = Pin < Box < dyn Future < Output = io:: Result < Io > > + Send > > ;
16
+ pub type PendingIo < Io > = Pin < Box < dyn Future < Output = io:: Result < Io > > + Send + Sync > > ;
17
17
18
18
/// A layer can be applied to pre-process a newly established IO object. If you need
19
19
/// multiple layers, use a single top-level layer that contains and calls the other layers.
20
- pub trait Layer < Io : AsyncRead + AsyncWrite > : ' static {
20
+ pub trait Layer < Io : AsyncRead + AsyncWrite > : Send + Sync + ' static {
21
21
/// The processing method. This method is called with the IO object that
22
22
/// should be processed, and returns a future that resolves to a processing error
23
23
/// or the processed IO object.
@@ -97,7 +97,7 @@ pub trait UnderlyingIo: Sized + Unpin {
97
97
}
98
98
99
99
impl UnderlyingIo for TcpStream {
100
- fn establish ( addr : SocketAddr ) -> Pin < Box < dyn Future < Output = io :: Result < Self > > + Send > > {
100
+ fn establish ( addr : SocketAddr ) -> PendingIo < TcpStream > {
101
101
Box :: pin ( async move {
102
102
let stream = TcpStream :: connect ( addr) . await ?;
103
103
stream. set_nodelay ( true ) ?;
You can’t perform that action at this time.
0 commit comments