Skip to content

Commit

Permalink
style: ignore false-positive lint clippy::duplicated_attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC committed Mar 24, 2024
1 parent d08ee2f commit 5387d72
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions src/sys/statfs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@ pub struct Statfs(type_of_statfs);
type fs_type_t = u32;
#[cfg(target_os = "android")]
type fs_type_t = libc::c_ulong;
#[cfg(all(
target_os = "linux",
target_arch = "s390x",
not(target_env = "musl")
))]
#[cfg(all(target_os = "linux", target_arch = "s390x", not(target_env = "musl")))]
type fs_type_t = libc::c_uint;
#[cfg(all(target_os = "linux", target_env = "musl"))]
type fs_type_t = libc::c_ulong;
Expand Down Expand Up @@ -324,11 +320,7 @@ impl Statfs {
}

/// Optimal transfer block size
#[cfg(all(
target_os = "linux",
target_arch = "s390x",
not(target_env = "musl")
))]
#[cfg(all(target_os = "linux", target_arch = "s390x", not(target_env = "musl")))]
pub fn optimal_transfer_size(&self) -> u32 {
self.0.f_bsize
}
Expand Down Expand Up @@ -383,11 +375,7 @@ impl Statfs {

/// Size of a block
// f_bsize on linux: https://github.com/torvalds/linux/blob/master/fs/nfs/super.c#L471
#[cfg(all(
target_os = "linux",
target_arch = "s390x",
not(target_env = "musl")
))]
#[cfg(all(target_os = "linux", target_arch = "s390x", not(target_env = "musl")))]
pub fn block_size(&self) -> u32 {
self.0.f_bsize
}
Expand Down Expand Up @@ -468,11 +456,7 @@ impl Statfs {
}

/// Maximum length of filenames
#[cfg(all(
target_os = "linux",
target_arch = "s390x",
not(target_env = "musl")
))]
#[cfg(all(target_os = "linux", target_arch = "s390x", not(target_env = "musl")))]
pub fn maximum_name_length(&self) -> u32 {
self.0.f_namelen
}
Expand Down

0 comments on commit 5387d72

Please sign in to comment.