Skip to content

Commit bc54c25

Browse files
taiki-eThomasdezeeuw
authored andcommitted
Update windows-sys to 0.48
1 parent 9bd0e95 commit bc54c25

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ log = "0.4.8"
4949
libc = "0.2.121"
5050

5151
[target.'cfg(windows)'.dependencies.windows-sys]
52-
version = "0.45"
52+
version = "0.48"
5353
features = [
5454
"Win32_Foundation", # Basic types eg HANDLE
5555
"Win32_Networking_WinSock", # winsock2 types/functions

src/sys/windows/net.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn init() {
2121
}
2222

2323
/// Create a new non-blocking socket.
24-
pub(crate) fn new_ip_socket(addr: SocketAddr, socket_type: u16) -> io::Result<SOCKET> {
24+
pub(crate) fn new_ip_socket(addr: SocketAddr, socket_type: i32) -> io::Result<SOCKET> {
2525
let domain = match addr {
2626
SocketAddr::V4(..) => AF_INET,
2727
SocketAddr::V6(..) => AF_INET6,
@@ -30,11 +30,11 @@ pub(crate) fn new_ip_socket(addr: SocketAddr, socket_type: u16) -> io::Result<SO
3030
new_socket(domain.into(), socket_type)
3131
}
3232

33-
pub(crate) fn new_socket(domain: u32, socket_type: u16) -> io::Result<SOCKET> {
33+
pub(crate) fn new_socket(domain: u32, socket_type: i32) -> io::Result<SOCKET> {
3434
init();
3535

3636
let socket = syscall!(
37-
socket(domain as i32, socket_type as i32, 0),
37+
socket(domain as i32, socket_type, 0),
3838
PartialEq::eq,
3939
INVALID_SOCKET
4040
)?;

0 commit comments

Comments
 (0)