fix windows build

This commit is contained in:
fakeshadow 2021-05-03 13:19:22 +08:00
parent 2a1300ffbf
commit f3c9e465e0
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ mod win_impl {
// FIXME: This is a workaround and we need an efficient way to convert between mio and tokio stream
impl FromConnection<MioTcpStream> for TcpStream {
fn from_conn(conn: MioTcpStream) -> io::Result<Self> {
let raw = IntoRawSocket::into_raw_socket(mio);
let raw = IntoRawSocket::into_raw_socket(conn);
// SAFETY: This is a in place conversion from mio stream to tokio stream.
TcpStream::from_std(unsafe { FromRawSocket::from_raw_socket(raw) })
}