Skip to content

Commit 54b625d

Browse files
bergwolferyugey
authored andcommitted
abi: unify st_nlink
It has different types on different architectures. Let's just simplify things and depress clippy on it. This would fix clippy error on archs like s390x as well. Signed-off-by: Peng Tao <[email protected]>
1 parent 9215b58 commit 54b625d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/abi/fuse_abi_linux.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -595,10 +595,8 @@ impl Attr {
595595
// In Linux st.st_nlink is u64 on x86_64 and powerpc64, and u32 on other architectures
596596
// ref:
597597
// linux: https://github.com/rust-lang/rust/blob/1.69.0/library/std/src/os/linux/raw.rs#L333
598-
#[cfg(any(target_arch = "x86_64", target_arch = "powerpc64"))]
598+
#[allow(clippy::unnecessary_cast)]
599599
nlink: st.st_nlink as u32,
600-
#[cfg(not(any(target_arch = "x86_64", target_arch = "powerpc64")))]
601-
nlink: st.st_nlink,
602600
uid: st.st_uid,
603601
gid: st.st_gid,
604602
rdev: st.st_rdev as u32,

0 commit comments

Comments
 (0)