From a09b1c8ac643d448db479a108ac6726307075453 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Sat, 18 Sep 2021 21:07:00 -0600 Subject: Clippy cleanup And this time, start running Clippy in CI --- src/sys/timerfd.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/sys/timerfd.rs') 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) } } -- cgit v1.2.3