add some missing windows imports

master
dignifiedquire 5 years ago
parent 228cc59b3b
commit 3161a4e449

@ -229,7 +229,7 @@ cfg_unix! {
}
cfg_windows! {
use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle};
use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle, AsRawSocket, RawSocket, FromRawSocket};
impl AsRawSocket for TcpListener {
fn as_raw_socket(&self) -> RawSocket {

@ -388,7 +388,7 @@ cfg_unix! {
}
cfg_windows! {
use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle};
use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle, RawSocket, AsRawSocket, FromRawSocket, IntoRawSocket};
impl AsRawSocket for TcpStream {
fn as_raw_socket(&self) -> RawSocket {
@ -402,9 +402,12 @@ cfg_windows! {
}
}
impl IntoRawSocket for TcpListener {
impl IntoRawSocket for crate::net::tcp::TcpListener {
fn into_raw_socket(self) -> RawSocket {
self.raw_socket
// TODO(stjepang): This does not mean `RawFd` is now the sole owner of the file
// descriptor because it's possible that there are other clones of this `TcpStream`
// using it at the same time. We should probably document that behavior.
self.as_raw_socket()
}
}
}

@ -482,7 +482,7 @@ cfg_unix! {
}
cfg_windows! {
use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle};
use crate::os::windows::io::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle, RawSocket, AsRawSocket, IntoRawSocket, FromRawSocket};
impl AsRawSocket for UdpSocket {
fn as_raw_socket(&self) -> RawSocket {

Loading…
Cancel
Save