summaryrefslogtreecommitdiff
path: root/src/dir.rs
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2021-09-18 21:07:00 -0600
committerAlan Somers <asomers@gmail.com>2021-09-19 07:58:15 -0600
commita09b1c8ac643d448db479a108ac6726307075453 (patch)
tree654a84d639d1feca971396f958f7589fc1fb81bf /src/dir.rs
parentf0d6d0406d8e763619aecac062d1d2b56ca6e7b2 (diff)
downloadnix-a09b1c8ac643d448db479a108ac6726307075453.zip
Clippy cleanup
And this time, start running Clippy in CI
Diffstat (limited to 'src/dir.rs')
-rw-r--r--src/dir.rs3
1 files changed, 2 insertions, 1 deletions
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)
}