File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
branches/tmp/src/libstd/sys/windows Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -34,5 +34,5 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
34
34
refs/heads/beta: 522d09dfecbeca1595f25ac58c6d0178bbd21d7d
35
35
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
36
36
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37
- refs/heads/tmp: d0c589d5ced5006f72d766af2ccecf699ff76176
37
+ refs/heads/tmp: 0fc1a7da93e5d431f5cd54a3f1263e2a5f9e5748
38
38
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
Original file line number Diff line number Diff line change @@ -194,11 +194,11 @@ pub fn wouldblock() -> bool {
194
194
195
195
pub fn set_nonblocking ( fd : sock_t , nb : bool ) {
196
196
let mut set = nb as libc:: c_ulong ;
197
- ( if unsafe { c:: ioctlsocket ( fd, c:: FIONBIO , & mut set) } != 0 {
198
- Err ( last_error ( ) )
199
- } else {
200
- Ok ( ( ) )
201
- } ) . unwrap ( ) ;
197
+ if unsafe { c:: ioctlsocket ( fd, c:: FIONBIO , & mut set) } != 0 {
198
+ // The above function should not return an error unless we passed it
199
+ // invalid parameters. Panic on errors.
200
+ Err ( last_error ( ) ) . unwrap ( ) ;
201
+ }
202
202
}
203
203
204
204
pub fn init_net ( ) {
You can’t perform that action at this time.
0 commit comments