Skip to content

Commit 7b7e959

Browse files
authored
Merge pull request #433 from Mic92/fix-32bit
fix 32-bit compilation
2 parents d6a74b1 + 48f2823 commit 7b7e959

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/fs.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -379,15 +379,17 @@ impl CntrFs {
379379
match reply {
380380
ReplyDirectory::Directory(ref mut r) => r.add(
381381
entry.d_ino,
382-
dirp.offset,
382+
#[allow(clippy::useless_conversion)] // needed for 32bit
383+
dirp.offset.into(),
383384
dtype_kind(entry.d_type),
384385
OsStr::from_bytes(name.to_bytes()),
385386
),
386387
ReplyDirectory::DirectoryPlus(ref mut r) => {
387388
match self.lookup_inode(ino, OsStr::from_bytes(name.to_bytes())) {
388389
Ok((attr, generation)) => r.add(
389390
entry.d_ino,
390-
dirp.offset,
391+
#[allow(clippy::useless_conversion)] // needed for 32bit
392+
dirp.offset.into(),
391393
OsStr::from_bytes(name.to_bytes()),
392394
&TTL,
393395
&attr,
@@ -415,7 +417,8 @@ impl CntrFs {
415417
fn attr_from_stat(&self, attr: stat::FileStat) -> FileAttr {
416418
let ctime = UNIX_EPOCH + Duration::new(attr.st_ctime as u64, attr.st_ctime_nsec as u32);
417419
FileAttr {
418-
ino: attr.st_ino, // replaced by ino pointer
420+
#[allow(clippy::useless_conversion)] // needed for 32bit
421+
ino: attr.st_ino.into(), // replaced by ino pointer
419422
size: attr.st_size as u64,
420423
blocks: attr.st_blocks as u64,
421424
atime: UNIX_EPOCH + Duration::new(attr.st_atime as u64, attr.st_atime_nsec as u32),

0 commit comments

Comments
 (0)