diff options
author | Alan Somers <asomers@gmail.com> | 2019-08-19 15:55:25 -0600 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2019-08-29 10:06:02 -0600 |
commit | 417e91363a25c663ff884f3dcb879832bf0a66ed (patch) | |
tree | e4643f14f1701edc48d0818ef1b4707377f77612 /src/dir.rs | |
parent | faaacf959a47f286306ae73a2b24a649e2249199 (diff) | |
download | nix-417e91363a25c663ff884f3dcb879832bf0a66ed.zip |
Clippy cleanup
Diffstat (limited to 'src/dir.rs')
-rw-r--r-- | src/dir.rs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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. |