From 805aabcb0a15aa48f7780aacef475f3bfbc74af3 Mon Sep 17 00:00:00 2001 From: richerfu Date: Wed, 22 Jan 2025 10:01:52 +0800 Subject: [PATCH] chore: format code --- src/lib.rs | 5 ++++- src/sys/ioctl/linux.rs | 7 ++++++- src/sys/mod.rs | 5 ++++- test/sys/test_pthread.rs | 6 +++++- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 70bf27a9f0..6306cfef01 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -145,7 +145,10 @@ feature! { #![feature = "mount"] pub mod mount; } -#[cfg(all(any(freebsdlike, target_os = "linux", target_os = "netbsd"), not(target_env = "ohos")))] +#[cfg(all( + any(freebsdlike, target_os = "linux", target_os = "netbsd"), + not(target_env = "ohos") +))] feature! { #![feature = "mqueue"] pub mod mqueue; diff --git a/src/sys/ioctl/linux.rs b/src/sys/ioctl/linux.rs index e95696caa6..314b1c9b6f 100644 --- a/src/sys/ioctl/linux.rs +++ b/src/sys/ioctl/linux.rs @@ -1,7 +1,12 @@ use cfg_if::cfg_if; /// The datatype used for the ioctl number -#[cfg(any(target_os = "android", target_os = "fuchsia", target_env = "musl", target_env = "ohos"))] +#[cfg(any( + target_os = "android", + target_os = "fuchsia", + target_env = "musl", + target_env = "ohos" +))] #[doc(hidden)] pub type ioctl_num_type = ::libc::c_int; #[cfg(not(any( diff --git a/src/sys/mod.rs b/src/sys/mod.rs index 1b690c16bd..ddc163e664 100644 --- a/src/sys/mod.rs +++ b/src/sys/mod.rs @@ -1,7 +1,10 @@ //! Mostly platform-specific functionality #[cfg(any( freebsdlike, - all(target_os = "linux", not(any(target_env = "uclibc", target_env = "ohos"))), + all( + target_os = "linux", + not(any(target_env = "uclibc", target_env = "ohos")) + ), apple_targets, target_os = "netbsd" ))] diff --git a/test/sys/test_pthread.rs b/test/sys/test_pthread.rs index 8bb7aa0610..5af128ce63 100644 --- a/test/sys/test_pthread.rs +++ b/test/sys/test_pthread.rs @@ -7,7 +7,11 @@ fn test_pthread_self() { assert!(!tid.is_null()); } -#[cfg(not(any(target_env = "musl", target_os = "redox", target_env = "ohos")))] +#[cfg(not(any( + target_env = "musl", + target_os = "redox", + target_env = "ohos" +)))] #[test] fn test_pthread_self() { let tid = pthread_self();