File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -227,9 +227,8 @@ impl Entry {
227
227
/// See platform `readdir(3)` or `dirent(5)` manpage for when the file type is known;
228
228
/// notably, some Linux filesystems don't implement this. The caller should use `stat` or
229
229
/// `fstat` if this returns `None`.
230
- #[ cfg( not( any( target_os = "illumos" , target_os = "solaris" ) ) ) ]
231
230
pub fn file_type ( & self ) -> Option < Type > {
232
- #[ cfg( not( target_os = "illumos" ) ) ]
231
+ #[ cfg( not( any ( target_os = "illumos" , target_os = "solaris" ) ) ) ]
233
232
match self . 0 . d_type {
234
233
libc:: DT_FIFO => Some ( Type :: Fifo ) ,
235
234
libc:: DT_CHR => Some ( Type :: CharacterDevice ) ,
@@ -241,13 +240,8 @@ impl Entry {
241
240
/* libc::DT_UNKNOWN | */ _ => None ,
242
241
}
243
242
244
- // illumos systems do not have the d_type member at all:
245
- #[ cfg( target_os = "illumos" ) ]
246
- None
247
- }
248
-
249
- #[ cfg( any( target_os = "illumos" , target_os = "solaris" ) ) ]
250
- pub fn file_type ( & self ) -> Option < Type > {
243
+ // illumos and Solaris systems do not have the d_type member at all:
244
+ #[ cfg( any( target_os = "illumos" , target_os = "solaris" ) ) ]
251
245
None
252
246
}
253
247
}
Original file line number Diff line number Diff line change @@ -496,8 +496,7 @@ fn desc(errno: Errno) -> &'static str {
496
496
#[ cfg( any( target_os = "freebsd" , target_os = "dragonfly" ) ) ]
497
497
EDOOFUS => "Programming error" ,
498
498
499
- #[ cfg( any( target_os = "freebsd" , target_os = "dragonfly" ,
500
- target_os = "redox" ) ) ]
499
+ #[ cfg( any( target_os = "freebsd" , target_os = "dragonfly" , target_os = "redox" ) ) ]
501
500
EMULTIHOP => "Multihop attempted" ,
502
501
503
502
#[ cfg( any( target_os = "freebsd" , target_os = "dragonfly" ,
You can’t perform that action at this time.
0 commit comments