Skip to content

Commit 48deb83

Browse files
committed
---
yaml --- r: 187761 b: refs/heads/tmp c: 0fc1a7d h: refs/heads/master i: 187759: 62ca581 v: v3
1 parent 5617b3b commit 48deb83

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 522d09dfecbeca1595f25ac58c6d0178bbd21d7d
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: d0c589d5ced5006f72d766af2ccecf699ff76176
37+
refs/heads/tmp: 0fc1a7da93e5d431f5cd54a3f1263e2a5f9e5748
3838
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/tmp/src/libstd/sys/windows/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,11 @@ pub fn wouldblock() -> bool {
194194

195195
pub fn set_nonblocking(fd: sock_t, nb: bool) {
196196
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+
}
202202
}
203203

204204
pub fn init_net() {

0 commit comments

Comments
 (0)