Fix code style
This commit is contained in:
@@ -543,7 +543,12 @@ impl FileAttr {
|
||||
SystemTime::new(self.stat.st_atim.tv_sec as i64, self.stat.st_atim.tv_nsec as i64)
|
||||
}
|
||||
|
||||
#[cfg(any(target_os = "freebsd", target_os = "openbsd", target_vendor = "apple", target_os = "cygwin"))]
|
||||
#[cfg(any(
|
||||
target_os = "freebsd",
|
||||
target_os = "openbsd",
|
||||
target_vendor = "apple",
|
||||
target_os = "cygwin",
|
||||
))]
|
||||
pub fn created(&self) -> io::Result<SystemTime> {
|
||||
SystemTime::new(self.stat.st_birthtime as i64, self.stat.st_birthtime_nsec as i64)
|
||||
}
|
||||
|
||||
@@ -372,7 +372,8 @@ mod imp {
|
||||
// this way someone on any unix-y OS can check that all these compile
|
||||
if cfg!(all(target_os = "linux", not(target_env = "musl"))) {
|
||||
install_main_guard_linux(page_size)
|
||||
} else if cfg!(any(all(target_os = "linux", target_env = "musl"), target_os = "cygwin")) {
|
||||
} else if cfg!(any(all(target_os = "linux", target_env = "musl"), target_os = "cygwin"))
|
||||
{
|
||||
install_main_guard_linux_musl(page_size)
|
||||
} else if cfg!(target_os = "freebsd") {
|
||||
install_main_guard_freebsd(page_size)
|
||||
|
||||
@@ -95,9 +95,13 @@ fn getrandom(mut bytes: &mut [u8], insecure: bool) {
|
||||
let flags = if insecure {
|
||||
if GRND_INSECURE_AVAILABLE.load(Relaxed) {
|
||||
#[cfg(target_os = "cygwin")]
|
||||
{ libc::GRND_NONBLOCK }
|
||||
{
|
||||
libc::GRND_NONBLOCK
|
||||
}
|
||||
#[cfg(not(target_os = "cygwin"))]
|
||||
{ libc::GRND_INSECURE }
|
||||
{
|
||||
libc::GRND_INSECURE
|
||||
}
|
||||
} else {
|
||||
libc::GRND_NONBLOCK
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user