42
42
#![ doc( html_root_url = "https://docs.rs/postgres-openssl/0.3" ) ]
43
43
#![ warn( rust_2018_idioms, clippy:: all, missing_docs) ]
44
44
45
- use futures:: task:: Context ;
46
- use futures:: Poll ;
45
+ use std:: task:: { Poll , Context } ;
47
46
#[ cfg( feature = "runtime" ) ]
48
47
use openssl:: error:: ErrorStack ;
49
48
use openssl:: hash:: MessageDigest ;
@@ -57,12 +56,14 @@ use std::io;
57
56
use std:: pin:: Pin ;
58
57
#[ cfg( feature = "runtime" ) ]
59
58
use std:: sync:: Arc ;
60
- use tokio_io:: { AsyncRead , AsyncWrite , Buf , BufMut } ;
59
+ use tokio:: io:: { AsyncRead , AsyncWrite } ;
60
+ use bytes:: { Buf , BufMut } ;
61
61
use tokio_openssl:: { HandshakeError , SslStream } ;
62
62
use tokio_postgres:: tls;
63
63
#[ cfg( feature = "runtime" ) ]
64
64
use tokio_postgres:: tls:: MakeTlsConnect ;
65
65
use tokio_postgres:: tls:: { ChannelBinding , TlsConnect } ;
66
+ use std:: mem:: MaybeUninit ;
66
67
67
68
#[ cfg( test) ]
68
69
mod test;
@@ -156,7 +157,7 @@ impl<S> AsyncRead for TlsStream<S>
156
157
where
157
158
S : AsyncRead + AsyncWrite + Unpin ,
158
159
{
159
- unsafe fn prepare_uninitialized_buffer ( & self , buf : & mut [ u8 ] ) -> bool {
160
+ unsafe fn prepare_uninitialized_buffer ( & self , buf : & mut [ MaybeUninit < u8 > ] ) -> bool {
160
161
self . 0 . prepare_uninitialized_buffer ( buf)
161
162
}
162
163
0 commit comments