diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-01-30 16:55:20 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-02-03 09:32:35 -0800 |
| commit | f9a32cdabc1680b89bd7b579dc1e3f8f18c28257 (patch) | |
| tree | eb30082c0b18bd9510a805e9d416d69242652d3a /src/libnative/io/timer_timerfd.rs | |
| parent | 2a7c5e0b724d8318a7e7762e483c225e8a7420a1 (diff) | |
| download | rust-f9a32cdabc1680b89bd7b579dc1e3f8f18c28257.tar.gz rust-f9a32cdabc1680b89bd7b579dc1e3f8f18c28257.zip | |
std: Fixing all documentation
* Stop referencing io_error * Start changing "Failure" sections to "Error" sections * Update all doc examples to work.
Diffstat (limited to 'src/libnative/io/timer_timerfd.rs')
| -rw-r--r-- | src/libnative/io/timer_timerfd.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libnative/io/timer_timerfd.rs b/src/libnative/io/timer_timerfd.rs index ca20314997e..7c22e90bbff 100644 --- a/src/libnative/io/timer_timerfd.rs +++ b/src/libnative/io/timer_timerfd.rs @@ -96,7 +96,7 @@ fn helper(input: libc::c_int, messages: Port<Req>) { if fd == input { let mut buf = [0, ..1]; // drain the input file descriptor of its input - FileDesc::new(fd, false).inner_read(buf).unwrap(); + let _ = FileDesc::new(fd, false).inner_read(buf).unwrap(); incoming = true; } else { let mut bits = [0, ..8]; @@ -104,7 +104,7 @@ fn helper(input: libc::c_int, messages: Port<Req>) { // // FIXME: should this perform a send() this number of // times? - FileDesc::new(fd, false).inner_read(bits).unwrap(); + let _ = FileDesc::new(fd, false).inner_read(bits).unwrap(); let remove = { match map.find(&fd).expect("fd unregistered") { &(ref c, oneshot) => !c.try_send(()) || oneshot @@ -166,7 +166,8 @@ impl Timer { } pub fn sleep(ms: u64) { - unsafe { libc::usleep((ms * 1000) as libc::c_uint); } + // FIXME: this can fail because of EINTR, what do do? + let _ = unsafe { libc::usleep((ms * 1000) as libc::c_uint) }; } fn remove(&mut self) { |
