diff options
author | Alan Somers <asomers@gmail.com> | 2021-09-18 21:07:00 -0600 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2021-09-19 07:58:15 -0600 |
commit | a09b1c8ac643d448db479a108ac6726307075453 (patch) | |
tree | 654a84d639d1feca971396f958f7589fc1fb81bf /src/sys/timerfd.rs | |
parent | f0d6d0406d8e763619aecac062d1d2b56ca6e7b2 (diff) | |
download | nix-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.rs | 11 |
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) } } |