@@ -7,7 +7,7 @@ use unix_socket::UnixStream;
7
7
#[ cfg( unix) ]
8
8
use std:: os:: unix:: io:: { AsRawFd , RawFd } ;
9
9
#[ cfg( windows) ]
10
- use std:: os:: windows:: io:: { AsRawHandle , RawHandle } ;
10
+ use std:: os:: windows:: io:: { AsRawSocket , RawSocket } ;
11
11
12
12
use { SslMode , ConnectError , ConnectParams , ConnectTarget } ;
13
13
use io:: { NegotiateSsl , StreamWrapper } ;
@@ -19,7 +19,7 @@ const DEFAULT_PORT: u16 = 5432;
19
19
/// A connection to the Postgres server.
20
20
///
21
21
/// It implements `Read`, `Write` and `StreamWrapper`, as well as `AsRawFd` on
22
- /// Unix platforms and `AsRawHandle ` on Windows platforms.
22
+ /// Unix platforms and `AsRawSocket ` on Windows platforms.
23
23
pub struct Stream ( InternalStream ) ;
24
24
25
25
impl Read for Stream {
@@ -60,11 +60,11 @@ impl AsRawFd for Stream {
60
60
}
61
61
62
62
#[ cfg( windows) ]
63
- impl AsRawHandle for Stream {
64
- fn as_raw_handle ( & self ) -> RawHandle {
63
+ impl AsRawSocket for Stream {
64
+ fn as_raw_socket ( & self ) -> RawSocket {
65
65
// Unix sockets aren't supported on windows, so no need to match
66
66
match self . 0 {
67
- InternalStream :: Tcp ( ref s) => s. as_raw_handle ( ) ,
67
+ InternalStream :: Tcp ( ref s) => s. as_raw_socket ( ) ,
68
68
}
69
69
}
70
70
}
0 commit comments