From 5715d143a53cc31698a8bb93ddd2201aa7ad8729 Mon Sep 17 00:00:00 2001 From: Peter Ammon Date: Tue, 23 Dec 2025 08:44:10 -0800 Subject: [PATCH] Fix some clipplies --- src/fd_readable_set.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/fd_readable_set.rs b/src/fd_readable_set.rs index d78615a8c..5d2b57635 100644 --- a/src/fd_readable_set.rs +++ b/src/fd_readable_set.rs @@ -103,9 +103,7 @@ pub fn check_readable(&mut self, timeout: Timeout) -> c_int { &mut tvs } }; - unsafe { - return libc::select(self.nfds_, &mut self.fdset_, null, null, timeout); - } + unsafe { libc::select(self.nfds_, &mut self.fdset_, null, null, timeout) } } /// Check if a single fd is readable, with a given timeout. @@ -117,13 +115,13 @@ pub fn is_fd_readable(fd: RawFd, timeout: Timeout) -> bool { let mut s = Self::new(); s.add(fd); let res = s.check_readable(timeout); - return res > 0 && s.test(fd); + res > 0 && s.test(fd) } /// Check if a single fd is readable, without blocking. /// Returns `true` if readable, `false` if not. pub fn poll_fd_readable(fd: RawFd) -> bool { - return Self::is_fd_readable(fd, Timeout::ZERO); + Self::is_fd_readable(fd, Timeout::ZERO) } }