diff options
author | SteveLauC <stevelauc@outlook.com> | 2022-08-09 12:17:27 +0800 |
---|---|---|
committer | SteveLauC <stevelauc@outlook.com> | 2022-08-09 12:17:27 +0800 |
commit | 347915bdb590d9b3437b9c5c69c6f1652017d325 (patch) | |
tree | 4a309e5a56e5e1443a4e01129dd7dd082e2601a7 /src | |
parent | d458ecd4e1205d36230ecac85c67472e3227a92d (diff) | |
download | nix-347915bdb590d9b3437b9c5c69c6f1652017d325.zip |
format code
Diffstat (limited to 'src')
-rw-r--r-- | src/sys/time.rs | 50 | ||||
-rw-r--r-- | src/unistd.rs | 58 |
2 files changed, 54 insertions, 54 deletions
diff --git a/src/sys/time.rs b/src/sys/time.rs index 36279978..e7a72f02 100644 --- a/src/sys/time.rs +++ b/src/sys/time.rs @@ -7,17 +7,17 @@ use std::time::Duration; use std::{cmp, fmt, ops}; #[cfg(any( -all(feature = "time", any(target_os = "android", target_os = "linux")), -all( -any( -target_os = "freebsd", -target_os = "illumos", -target_os = "linux", -target_os = "netbsd" -), -feature = "time", -feature = "signal" -) + all(feature = "time", any(target_os = "android", target_os = "linux")), + all( + any( + target_os = "freebsd", + target_os = "illumos", + target_os = "linux", + target_os = "netbsd" + ), + feature = "time", + feature = "signal" + ) ))] pub(crate) mod timer { use crate::sys::time::TimeSpec; @@ -98,10 +98,10 @@ pub(crate) mod timer { } } #[cfg(any( - target_os = "freebsd", - target_os = "netbsd", - target_os = "dragonfly", - target_os = "illumos" + target_os = "freebsd", + target_os = "netbsd", + target_os = "dragonfly", + target_os = "illumos" ))] bitflags! { /// Flags that are used for arming the timer. @@ -114,17 +114,17 @@ pub(crate) mod timer { fn from(timerspec: TimerSpec) -> Expiration { match timerspec { TimerSpec(libc::itimerspec { - it_interval: - libc::timespec { - tv_sec: 0, - tv_nsec: 0, - }, - it_value: ts, - }) => Expiration::OneShot(ts.into()), + it_interval: + libc::timespec { + tv_sec: 0, + tv_nsec: 0, + }, + it_value: ts, + }) => Expiration::OneShot(ts.into()), TimerSpec(libc::itimerspec { - it_interval: int_ts, - it_value: val_ts, - }) => { + it_interval: int_ts, + it_value: val_ts, + }) => { if (int_ts.tv_sec == val_ts.tv_sec) && (int_ts.tv_nsec == val_ts.tv_nsec) { diff --git a/src/unistd.rs b/src/unistd.rs index 69419d64..2209c069 100644 --- a/src/unistd.rs +++ b/src/unistd.rs @@ -7,15 +7,15 @@ use crate::fcntl::{at_rawfd, AtFlags}; #[cfg(feature = "fs")] use crate::fcntl::{fcntl, FcntlArg::F_SETFD, FdFlag, OFlag}; #[cfg(all( -feature = "fs", -any( -target_os = "openbsd", -target_os = "netbsd", -target_os = "freebsd", -target_os = "dragonfly", -target_os = "macos", -target_os = "ios" -) + feature = "fs", + any( + target_os = "openbsd", + target_os = "netbsd", + target_os = "freebsd", + target_os = "dragonfly", + target_os = "macos", + target_os = "ios" + ) ))] use crate::sys::stat::FileFlag; #[cfg(feature = "fs")] @@ -45,20 +45,20 @@ feature! { } #[cfg(any( -target_os = "android", -target_os = "dragonfly", -target_os = "freebsd", -target_os = "linux", -target_os = "openbsd" + target_os = "android", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "linux", + target_os = "openbsd" ))] pub use self::setres::*; #[cfg(any( -target_os = "android", -target_os = "dragonfly", -target_os = "freebsd", -target_os = "linux", -target_os = "openbsd" + target_os = "android", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "linux", + target_os = "openbsd" ))] pub use self::getres::*; @@ -2752,11 +2752,11 @@ mod pivot_root { } #[cfg(any( -target_os = "android", -target_os = "dragonfly", -target_os = "freebsd", -target_os = "linux", -target_os = "openbsd" + target_os = "android", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "linux", + target_os = "openbsd" ))] mod setres { feature! { @@ -2801,11 +2801,11 @@ mod setres { } #[cfg(any( -target_os = "android", -target_os = "dragonfly", -target_os = "freebsd", -target_os = "linux", -target_os = "openbsd" + target_os = "android", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "linux", + target_os = "openbsd" ))] mod getres { feature! { |