@@ -51,7 +51,11 @@ pub struct Statfs(type_of_statfs);
51
51
type fs_type_t = u32 ;
52
52
#[ cfg( target_os = "android" ) ]
53
53
type fs_type_t = libc:: c_ulong ;
54
- #[ cfg( all( target_os = "linux" , target_arch = "s390x" , not( target_env = "musl" ) ) ) ]
54
+ #[ cfg( all(
55
+ target_os = "linux" ,
56
+ target_arch = "s390x" ,
57
+ not( target_env = "musl" )
58
+ ) ) ]
55
59
type fs_type_t = libc:: c_uint ;
56
60
#[ cfg( all( target_os = "linux" , target_env = "musl" ) ) ]
57
61
type fs_type_t = libc:: c_ulong ;
@@ -71,6 +75,8 @@ type fs_type_t = libc::c_int;
71
75
type fs_type_t = libc:: __fsword_t ;
72
76
73
77
/// Describes the file system type as known by the operating system.
78
+ // false positive, see: https://github.com/rust-lang/rust-clippy/issues/12537
79
+ #[ allow( clippy:: duplicated_attributes) ]
74
80
#[ cfg( any(
75
81
target_os = "freebsd" ,
76
82
target_os = "android" ,
@@ -318,7 +324,11 @@ impl Statfs {
318
324
}
319
325
320
326
/// Optimal transfer block size
321
- #[ cfg( all( target_os = "linux" , target_arch = "s390x" , not( target_env = "musl" ) ) ) ]
327
+ #[ cfg( all(
328
+ target_os = "linux" ,
329
+ target_arch = "s390x" ,
330
+ not( target_env = "musl" )
331
+ ) ) ]
322
332
pub fn optimal_transfer_size ( & self ) -> u32 {
323
333
self . 0 . f_bsize
324
334
}
@@ -373,7 +383,11 @@ impl Statfs {
373
383
374
384
/// Size of a block
375
385
// f_bsize on linux: https://github.com/torvalds/linux/blob/master/fs/nfs/super.c#L471
376
- #[ cfg( all( target_os = "linux" , target_arch = "s390x" , not( target_env = "musl" ) ) ) ]
386
+ #[ cfg( all(
387
+ target_os = "linux" ,
388
+ target_arch = "s390x" ,
389
+ not( target_env = "musl" )
390
+ ) ) ]
377
391
pub fn block_size ( & self ) -> u32 {
378
392
self . 0 . f_bsize
379
393
}
@@ -454,7 +468,11 @@ impl Statfs {
454
468
}
455
469
456
470
/// Maximum length of filenames
457
- #[ cfg( all( target_os = "linux" , target_arch = "s390x" , not( target_env = "musl" ) ) ) ]
471
+ #[ cfg( all(
472
+ target_os = "linux" ,
473
+ target_arch = "s390x" ,
474
+ not( target_env = "musl" )
475
+ ) ) ]
458
476
pub fn maximum_name_length ( & self ) -> u32 {
459
477
self . 0 . f_namelen
460
478
}
0 commit comments