File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -582,19 +582,20 @@ impl<T: AsRawSocket> Async<T> {
582
582
let sock = io. as_raw_socket ( ) ;
583
583
584
584
// Put the socket in non-blocking mode.
585
- unsafe {
586
- use winapi:: ctypes;
587
- use winapi:: um:: winsock2;
588
585
589
- let mut nonblocking = true as ctypes:: c_ulong ;
590
- let res = winsock2:: ioctlsocket (
586
+ use winapi:: ctypes;
587
+ use winapi:: um:: winsock2;
588
+
589
+ let mut nonblocking = true as ctypes:: c_ulong ;
590
+ let res = unsafe {
591
+ winsock2:: ioctlsocket (
591
592
sock as winsock2:: SOCKET ,
592
593
winsock2:: FIONBIO ,
593
594
& mut nonblocking,
594
- ) ;
595
- if res != 0 {
596
- return Err ( io :: Error :: last_os_error ( ) ) ;
597
- }
595
+ )
596
+ } ;
597
+ if res != 0 {
598
+ return Err ( io :: Error :: last_os_error ( ) ) ;
598
599
}
599
600
600
601
Ok ( Async {
You can’t perform that action at this time.
0 commit comments