Silence clippy lints

This commit is contained in:
Fabian Boehm 2024-11-24 11:17:34 +01:00
parent 1347df898e
commit f0a5f8738b
2 changed files with 3 additions and 1 deletions

View File

@ -714,7 +714,7 @@ fn path_remoteness(path: &wstr) -> DirRemoteness {
0x19830326 | // fhgfs / BeeGFS. Undocumented magic number.
0x013111A7 | 0x013111A8 | // IBRIX. Undocumented.
0x65735546 | // FUSE_SUPER_MAGIC
0xa501FCF5 // VXFS_SUPER_MAGIC
0xA501FCF5 // VXFS_SUPER_MAGIC
=> DirRemoteness::remote,
_ => {
DirRemoteness::unknown

View File

@ -105,6 +105,8 @@ impl DirEntry {
let narrow = wcs2zstring(&self.name);
let mut s: libc::stat = unsafe { std::mem::zeroed() };
if unsafe { libc::fstatat(fd, narrow.as_ptr(), &mut s, 0) } == 0 {
// st_dev is a dev_t, which is i32 on OpenBSD/Haiku and u32 in FreeBSD 11
#[allow(clippy::unnecessary_cast)]
let dev_inode = DevInode {
device: s.st_dev as u64,
inode: s.st_ino as u64,