mirror of https://github.com/fafhrd91/actix-net
fix windows build
This commit is contained in:
parent
2a1300ffbf
commit
f3c9e465e0
|
@ -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
|
// FIXME: This is a workaround and we need an efficient way to convert between mio and tokio stream
|
||||||
impl FromConnection<MioTcpStream> for TcpStream {
|
impl FromConnection<MioTcpStream> for TcpStream {
|
||||||
fn from_conn(conn: MioTcpStream) -> io::Result<Self> {
|
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.
|
// SAFETY: This is a in place conversion from mio stream to tokio stream.
|
||||||
TcpStream::from_std(unsafe { FromRawSocket::from_raw_socket(raw) })
|
TcpStream::from_std(unsafe { FromRawSocket::from_raw_socket(raw) })
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue