@@ -19,15 +19,15 @@ pub(crate) struct TcpListener {
19
19
}
20
20
21
21
impl runtime_raw:: TcpStream for TcpStream {
22
- fn poll_write_ready ( mut self : Pin < & mut Self > , _cx : & mut Context < ' _ > ) -> Poll < io:: Result < ( ) > > {
22
+ fn poll_write_ready ( self : Pin < & mut Self > , _cx : & mut Context < ' _ > ) -> Poll < io:: Result < ( ) > > {
23
23
match self . tokio_stream . poll_write_ready ( ) {
24
24
Err ( e) => Poll :: Ready ( Err ( e) ) ,
25
25
Ok ( futures01:: Async :: Ready ( _) ) => Poll :: Ready ( Ok ( ( ) ) ) ,
26
26
Ok ( futures01:: Async :: NotReady ) => Poll :: Pending ,
27
27
}
28
28
}
29
29
30
- fn poll_read_ready ( mut self : Pin < & mut Self > , _cx : & mut Context < ' _ > ) -> Poll < io:: Result < ( ) > > {
30
+ fn poll_read_ready ( self : Pin < & mut Self > , _cx : & mut Context < ' _ > ) -> Poll < io:: Result < ( ) > > {
31
31
let mask = mio:: Ready :: readable ( ) ;
32
32
match self . tokio_stream . poll_read_ready ( mask) {
33
33
Err ( e) => Poll :: Ready ( Err ( e) ) ,
@@ -61,7 +61,7 @@ impl runtime_raw::TcpStream for TcpStream {
61
61
62
62
impl AsyncRead for TcpStream {
63
63
fn poll_read (
64
- mut self : Pin < & mut Self > ,
64
+ self : Pin < & mut Self > ,
65
65
cx : & mut Context < ' _ > ,
66
66
mut buf : & mut [ u8 ] ,
67
67
) -> Poll < io:: Result < usize > > {
@@ -72,20 +72,20 @@ impl AsyncRead for TcpStream {
72
72
73
73
impl AsyncWrite for TcpStream {
74
74
fn poll_write (
75
- mut self : Pin < & mut Self > ,
75
+ self : Pin < & mut Self > ,
76
76
cx : & mut Context < ' _ > ,
77
77
buf : & [ u8 ] ,
78
78
) -> Poll < io:: Result < usize > > {
79
79
let mut stream = Compat01As03 :: new ( & self . tokio_stream ) ;
80
80
Pin :: new ( & mut stream) . poll_write ( cx, & buf)
81
81
}
82
82
83
- fn poll_flush ( mut self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < io:: Result < ( ) > > {
83
+ fn poll_flush ( self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < io:: Result < ( ) > > {
84
84
let mut stream = Compat01As03 :: new ( & self . tokio_stream ) ;
85
85
Pin :: new ( & mut stream) . poll_flush ( cx)
86
86
}
87
87
88
- fn poll_close ( mut self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < io:: Result < ( ) > > {
88
+ fn poll_close ( self : Pin < & mut Self > , cx : & mut Context < ' _ > ) -> Poll < io:: Result < ( ) > > {
89
89
let mut stream = Compat01As03 :: new ( & self . tokio_stream ) ;
90
90
Pin :: new ( & mut stream) . poll_close ( cx)
91
91
}
@@ -97,7 +97,7 @@ impl runtime_raw::TcpListener for TcpListener {
97
97
}
98
98
99
99
fn poll_accept (
100
- mut self : Pin < & mut Self > ,
100
+ self : Pin < & mut Self > ,
101
101
_cx : & mut Context < ' _ > ,
102
102
) -> Poll < io:: Result < Pin < Box < dyn runtime_raw:: TcpStream > > > > {
103
103
let listener = unsafe { & mut self . get_unchecked_mut ( ) . tokio_listener } ;
0 commit comments