diff options
author | Alan Somers <asomers@gmail.com> | 2021-09-19 08:29:31 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-19 08:29:31 -0600 |
commit | 515e99bcffcf324d03128649f3ee0ca14d67b5b1 (patch) | |
tree | 654a84d639d1feca971396f958f7589fc1fb81bf /src/sys/timerfd.rs | |
parent | f0d6d0406d8e763619aecac062d1d2b56ca6e7b2 (diff) | |
parent | a09b1c8ac643d448db479a108ac6726307075453 (diff) | |
download | nix-515e99bcffcf324d03128649f3ee0ca14d67b5b1.zip |
Merge pull request #1529 from asomers/clippy-9-2021
Clippy cleanup
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) } } |