Skip to content

Commit 3b6ea10

Browse files
committed
Run fmt
Signed-off-by: Keith Mattix II <[email protected]>
1 parent 9b9d47c commit 3b6ea10

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/sys/windows.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,10 +735,14 @@ pub(crate) fn set_tcp_keepalive(socket: Socket, keepalive: &TcpKeepalive) -> io:
735735
keepaliveinterval: into_ms(keepalive.interval),
736736
};
737737

738-
739738
if let Some(retries) = keepalive.retries {
740739
unsafe {
741-
setsockopt(socket, WinSock::IPPROTO_TCP, WinSock::TCP_KEEPCNT, retries as c_int)?
740+
setsockopt(
741+
socket,
742+
WinSock::IPPROTO_TCP,
743+
WinSock::TCP_KEEPCNT,
744+
retries as c_int,
745+
)?
742746
}
743747
}
744748
let mut out = 0;

tests/socket.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,7 @@ fn tcp_keepalive() {
893893
target_os = "netbsd",
894894
target_os = "tvos",
895895
target_os = "watchos",
896+
target_os = "windows"
896897
)
897898
))]
898899
let params = params.with_retries(10);
@@ -943,6 +944,7 @@ fn tcp_keepalive() {
943944
target_os = "netbsd",
944945
target_os = "tvos",
945946
target_os = "watchos",
947+
target_os = "windows",
946948
)
947949
))]
948950
assert_eq!(socket.keepalive_retries().unwrap(), 10);

0 commit comments

Comments
 (0)