File tree 3 files changed +91
-387
lines changed
3 files changed +91
-387
lines changed Original file line number Diff line number Diff line change @@ -225,15 +225,13 @@ impl Entry {
225
225
pub fn ino ( & self ) -> u64 {
226
226
cfg_if ! {
227
227
if #[ cfg( any( target_os = "aix" ,
228
- target_os = "android" ,
229
228
target_os = "emscripten" ,
230
229
target_os = "fuchsia" ,
231
230
target_os = "haiku" ,
232
- target_os = "illumos" ,
231
+ solarish,
232
+ linux_android,
233
233
apple_targets,
234
- target_os = "l4re" ,
235
- target_os = "linux" ,
236
- target_os = "solaris" ) ) ] {
234
+ target_os = "l4re" ) ) ] {
237
235
self . 0 . d_ino as u64
238
236
} else {
239
237
u64 :: from( self . 0 . d_fileno)
@@ -252,12 +250,7 @@ impl Entry {
252
250
/// notably, some Linux filesystems don't implement this. The caller should use `stat` or
253
251
/// `fstat` if this returns `None`.
254
252
pub fn file_type ( & self ) -> Option < Type > {
255
- #[ cfg( not( any(
256
- target_os = "aix" ,
257
- target_os = "illumos" ,
258
- target_os = "solaris" ,
259
- target_os = "haiku"
260
- ) ) ) ]
253
+ #[ cfg( not( any( solarish, target_os = "aix" , target_os = "haiku" ) ) ) ]
261
254
match self . 0 . d_type {
262
255
libc:: DT_FIFO => Some ( Type :: Fifo ) ,
263
256
libc:: DT_CHR => Some ( Type :: CharacterDevice ) ,
@@ -270,12 +263,7 @@ impl Entry {
270
263
}
271
264
272
265
// illumos, Solaris, and Haiku systems do not have the d_type member at all:
273
- #[ cfg( any(
274
- target_os = "aix" ,
275
- target_os = "illumos" ,
276
- target_os = "solaris" ,
277
- target_os = "haiku"
278
- ) ) ]
266
+ #[ cfg( any( solarish, target_os = "aix" , target_os = "haiku" ) ) ]
279
267
None
280
268
}
281
269
}
Original file line number Diff line number Diff line change @@ -40,11 +40,10 @@ impl std::error::Error for ClearEnvError {}
40
40
/// thread safety must still be upheld.
41
41
pub unsafe fn clearenv ( ) -> std:: result:: Result < ( ) , ClearEnvError > {
42
42
cfg_if ! {
43
- if #[ cfg( any( target_os = "fuchsia" ,
43
+ if #[ cfg( any( linux_android,
44
+ target_os = "fuchsia" ,
44
45
target_os = "wasi" ,
45
46
target_env = "uclibc" ,
46
- target_os = "linux" ,
47
- target_os = "android" ,
48
47
target_os = "emscripten" ) ) ] {
49
48
let ret = unsafe { libc:: clearenv( ) } ;
50
49
} else {
You can’t perform that action at this time.
0 commit comments