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/dir.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/dir.rs') diff --git a/src/dir.rs b/src/dir.rs index 65ed2e9d..ed70a458 100644 --- a/src/dir.rs +++ b/src/dir.rs @@ -84,7 +84,7 @@ impl AsRawFd for Dir { impl Drop for Dir { fn drop(&mut self) { let e = Errno::result(unsafe { libc::closedir(self.0.as_ptr()) }); - if !std::thread::panicking() && e == Err(Error::from(Errno::EBADF)) { + if !std::thread::panicking() && e == Err(Errno::EBADF) { panic!("Closing an invalid file descriptor!"); }; } @@ -211,6 +211,7 @@ impl Entry { target_os = "linux", target_os = "macos", target_os = "solaris")))] + #[allow(clippy::useless_conversion)] // Not useless on all OSes pub fn ino(&self) -> u64 { u64::from(self.0.d_fileno) } -- cgit v1.2.3