11use super :: Stream ;
2- use futures:: executor;
3- use futures:: io:: { AsyncRead , AsyncWrite } ;
4- use futures:: prelude:: * ;
5- use futures:: task:: { noop_waker_ref, Context } ;
2+ use futures_executor:: block_on;
3+ use futures_io:: { AsyncRead , AsyncWrite } ;
4+ use futures_util:: io:: { AsyncReadExt , AsyncWriteExt } ;
5+ use futures_util:: task:: { noop_waker_ref, Context } ;
6+ use futures_util:: { future, ready} ;
67use rustls:: internal:: pemfile:: { certs, rsa_private_keys} ;
78use rustls:: { ClientConfig , ClientSession , NoClientAuth , ServerConfig , ServerSession , Session } ;
89use std:: io:: { self , BufReader , Cursor , Read , Write } ;
@@ -105,7 +106,7 @@ fn stream_good() -> io::Result<()> {
105106 Ok ( ( ) ) as io:: Result < ( ) >
106107 } ;
107108
108- executor :: block_on ( fut)
109+ block_on ( fut)
109110}
110111
111112#[ test]
@@ -137,7 +138,7 @@ fn stream_bad() -> io::Result<()> {
137138 Ok ( ( ) ) as io:: Result < ( ) >
138139 } ;
139140
140- executor :: block_on ( fut)
141+ block_on ( fut)
141142}
142143
143144#[ test]
@@ -162,7 +163,7 @@ fn stream_handshake() -> io::Result<()> {
162163 Ok ( ( ) ) as io:: Result < ( ) >
163164 } ;
164165
165- executor :: block_on ( fut)
166+ block_on ( fut)
166167}
167168
168169#[ test]
@@ -183,7 +184,7 @@ fn stream_handshake_eof() -> io::Result<()> {
183184 Ok ( ( ) ) as io:: Result < ( ) >
184185 } ;
185186
186- executor :: block_on ( fut)
187+ block_on ( fut)
187188}
188189
189190#[ test]
@@ -202,7 +203,7 @@ fn stream_eof() -> io::Result<()> {
202203 Ok ( ( ) ) as io:: Result < ( ) >
203204 } ;
204205
205- executor :: block_on ( fut)
206+ block_on ( fut)
206207}
207208
208209fn make_pair ( ) -> ( ServerSession , ClientSession ) {
@@ -234,11 +235,11 @@ fn do_handshake(
234235 let mut stream = Stream :: new ( & mut good, client) ;
235236
236237 if stream. session . is_handshaking ( ) {
237- futures :: ready!( stream. complete_io( cx) ) ?;
238+ ready ! ( stream. complete_io( cx) ) ?;
238239 }
239240
240241 if stream. session . wants_write ( ) {
241- futures :: ready!( stream. complete_io( cx) ) ?;
242+ ready ! ( stream. complete_io( cx) ) ?;
242243 }
243244
244245 Poll :: Ready ( Ok ( ( ) ) )
0 commit comments