3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -541,7 +541,12 @@ impl FileAttr {
541
541
SystemTime :: new ( self . stat . st_atim . tv_sec as i64 , self . stat . st_atim . tv_nsec as i64 )
542
542
}
543
543
544
- #[ cfg( any( target_os = "freebsd" , target_os = "openbsd" , target_vendor = "apple" , target_os = "cygwin" ) ) ]
544
+ #[ cfg( any(
545
+ target_os = "freebsd" ,
546
+ target_os = "openbsd" ,
547
+ target_vendor = "apple" ,
548
+ target_os = "cygwin" ,
549
+ ) ) ]
545
550
pub fn created ( & self ) -> io:: Result < SystemTime > {
546
551
SystemTime :: new ( self . stat . st_birthtime as i64 , self . stat . st_birthtime_nsec as i64 )
547
552
}
Original file line number Diff line number Diff line change @@ -372,7 +372,8 @@ mod imp {
372
372
// this way someone on any unix-y OS can check that all these compile
373
373
if cfg ! ( all( target_os = "linux" , not( target_env = "musl" ) ) ) {
374
374
install_main_guard_linux ( page_size)
375
- } else if cfg ! ( any( all( target_os = "linux" , target_env = "musl" ) , target_os = "cygwin" ) ) {
375
+ } else if cfg ! ( any( all( target_os = "linux" , target_env = "musl" ) , target_os = "cygwin" ) )
376
+ {
376
377
install_main_guard_linux_musl ( page_size)
377
378
} else if cfg ! ( target_os = "freebsd" ) {
378
379
install_main_guard_freebsd ( page_size)
Original file line number Diff line number Diff line change @@ -95,9 +95,13 @@ fn getrandom(mut bytes: &mut [u8], insecure: bool) {
95
95
let flags = if insecure {
96
96
if GRND_INSECURE_AVAILABLE . load ( Relaxed ) {
97
97
#[ cfg( target_os = "cygwin" ) ]
98
- { libc:: GRND_NONBLOCK }
98
+ {
99
+ libc:: GRND_NONBLOCK
100
+ }
99
101
#[ cfg( not( target_os = "cygwin" ) ) ]
100
- { libc:: GRND_INSECURE }
102
+ {
103
+ libc:: GRND_INSECURE
104
+ }
101
105
} else {
102
106
libc:: GRND_NONBLOCK
103
107
}
0 commit comments