Commit 8dd22cb 1 parent 589d7b3 commit 8dd22cb Copy full SHA for 8dd22cb
File tree 2 files changed +2
-4
lines changed
2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -122,9 +122,8 @@ impl OpAble for Accept {
122
122
let stream_fd = syscall_u32 ! ( accept( fd, addr, len) ) ? as i32 ;
123
123
syscall_u32 ! ( fcntl( stream_fd, libc:: F_SETFD , libc:: FD_CLOEXEC ) )
124
124
. and_then ( |_| syscall_u32 ! ( fcntl( stream_fd, libc:: F_SETFL , libc:: O_NONBLOCK ) ) )
125
- . map_err ( |e | {
125
+ . inspect_err ( |_ | {
126
126
let _ = syscall_u32 ! ( close( stream_fd) ) ;
127
- e
128
127
} ) ?;
129
128
Ok ( stream_fd as _ )
130
129
} ;
Original file line number Diff line number Diff line change @@ -115,13 +115,12 @@ pub(crate) fn new_socket(
115
115
NO_ERROR as _
116
116
)
117
117
. map ( |_: i32 | socket as RawSocket )
118
- . map_err ( |e | {
118
+ . inspect_err ( |_ | {
119
119
// If either of the `ioctlsocket` calls failed, ensure the socket is
120
120
// closed and return the error.
121
121
unsafe {
122
122
closesocket ( socket) ;
123
123
WSACleanup ( ) ;
124
124
}
125
- e
126
125
} )
127
126
}
You can’t perform that action at this time.
0 commit comments