4242#![ doc( html_root_url = "https://docs.rs/postgres-openssl/0.3" ) ]
4343#![ warn( rust_2018_idioms, clippy:: all, missing_docs) ]
4444
45- use futures:: task:: Context ;
46- use futures:: Poll ;
45+ use std:: task:: { Poll , Context } ;
4746#[ cfg( feature = "runtime" ) ]
4847use openssl:: error:: ErrorStack ;
4948use openssl:: hash:: MessageDigest ;
@@ -57,12 +56,14 @@ use std::io;
5756use std:: pin:: Pin ;
5857#[ cfg( feature = "runtime" ) ]
5958use std:: sync:: Arc ;
60- use tokio_io:: { AsyncRead , AsyncWrite , Buf , BufMut } ;
59+ use tokio:: io:: { AsyncRead , AsyncWrite } ;
60+ use bytes:: { Buf , BufMut } ;
6161use tokio_openssl:: { HandshakeError , SslStream } ;
6262use tokio_postgres:: tls;
6363#[ cfg( feature = "runtime" ) ]
6464use tokio_postgres:: tls:: MakeTlsConnect ;
6565use tokio_postgres:: tls:: { ChannelBinding , TlsConnect } ;
66+ use std:: mem:: MaybeUninit ;
6667
6768#[ cfg( test) ]
6869mod test;
@@ -156,7 +157,7 @@ impl<S> AsyncRead for TlsStream<S>
156157where
157158 S : AsyncRead + AsyncWrite + Unpin ,
158159{
159- unsafe fn prepare_uninitialized_buffer ( & self , buf : & mut [ u8 ] ) -> bool {
160+ unsafe fn prepare_uninitialized_buffer ( & self , buf : & mut [ MaybeUninit < u8 > ] ) -> bool {
160161 self . 0 . prepare_uninitialized_buffer ( buf)
161162 }
162163
0 commit comments