summaryrefslogtreecommitdiff
path: root/src/dir.rs
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2019-08-19 15:55:25 -0600
committerAlan Somers <asomers@gmail.com>2019-08-29 10:06:02 -0600
commit417e91363a25c663ff884f3dcb879832bf0a66ed (patch)
treee4643f14f1701edc48d0818ef1b4707377f77612 /src/dir.rs
parentfaaacf959a47f286306ae73a2b24a649e2249199 (diff)
downloadnix-417e91363a25c663ff884f3dcb879832bf0a66ed.zip
Clippy cleanup
Diffstat (limited to 'src/dir.rs')
-rw-r--r--src/dir.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dir.rs b/src/dir.rs
index 1820b533..5dfc51c9 100644
--- a/src/dir.rs
+++ b/src/dir.rs
@@ -107,11 +107,11 @@ impl<'d> Iterator for Iter<'d> {
if let Err(e) = Errno::result(readdir_r((self.0).0.as_ptr(), &mut ent.0, &mut result)) {
return Some(Err(e));
}
- if result == ptr::null_mut() {
+ if result.is_null() {
return None;
}
assert_eq!(result, &mut ent.0 as *mut dirent);
- return Some(Ok(ent));
+ Some(Ok(ent))
}
}
}
@@ -165,7 +165,7 @@ impl Entry {
target_os = "macos",
target_os = "solaris")))]
pub fn ino(&self) -> u64 {
- self.0.d_fileno as u64
+ u64::from(self.0.d_fileno)
}
/// Returns the bare file name of this directory entry without any other leading path component.