summaryrefslogtreecommitdiff
path: root/src/sys/timerfd.rs
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2021-09-18 21:07:00 -0600
committerAlan Somers <asomers@gmail.com>2021-09-19 07:58:15 -0600
commita09b1c8ac643d448db479a108ac6726307075453 (patch)
tree654a84d639d1feca971396f958f7589fc1fb81bf /src/sys/timerfd.rs
parentf0d6d0406d8e763619aecac062d1d2b56ca6e7b2 (diff)
downloadnix-a09b1c8ac643d448db479a108ac6726307075453.zip
Clippy cleanup
And this time, start running Clippy in CI
Diffstat (limited to 'src/sys/timerfd.rs')
-rw-r--r--src/sys/timerfd.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/sys/timerfd.rs b/src/sys/timerfd.rs
index 5d87b7c2..705a3c4d 100644
--- a/src/sys/timerfd.rs
+++ b/src/sys/timerfd.rs
@@ -257,14 +257,9 @@ impl TimerFd {
///
/// Note: If the alarm is unset, then you will wait forever.
pub fn wait(&self) -> Result<()> {
- loop {
- if let Err(e) = read(self.fd, &mut [0u8; 8]) {
- match e {
- Errno::EINTR => continue,
- _ => return Err(e),
- }
- } else {
- break;
+ while let Err(e) = read(self.fd, &mut [0u8; 8]) {
+ if e != Errno::EINTR {
+ return Err(e)
}
}