diff --git a/src/lib.rs b/src/lib.rs index 9c12c2e6e..1a1e411c3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -116,6 +116,16 @@ mod debug; mod serde; pub(crate) mod utils; +// Make formattable by rustfmt. +#[cfg(any())] +mod network; +#[cfg(any())] +mod unix; +#[cfg(any())] +mod unknown; +#[cfg(any())] +mod windows; + /// This function is only used on Linux targets, when the `system` feature is enabled. In other /// cases, it does nothing and returns `false`. /// diff --git a/src/unix/apple/macos/mod.rs b/src/unix/apple/macos/mod.rs index 60955fd03..eab3ca92f 100644 --- a/src/unix/apple/macos/mod.rs +++ b/src/unix/apple/macos/mod.rs @@ -33,3 +33,17 @@ cfg_if! { pub mod component; } } + +// Make formattable by rustfmt. +#[cfg(any())] +mod component; +#[cfg(any())] +mod cpu; +#[cfg(any())] +mod disk; +#[cfg(any())] +mod process; +#[cfg(any())] +mod system; +#[cfg(any())] +mod utils; diff --git a/src/unix/apple/mod.rs b/src/unix/apple/mod.rs index 5238b54cd..8f1c703d1 100644 --- a/src/unix/apple/mod.rs +++ b/src/unix/apple/mod.rs @@ -57,3 +57,25 @@ cfg_if! { #[doc = include_str!("../../../md_doc/is_supported.md")] pub const IS_SUPPORTED_SYSTEM: bool = true; + +// Make formattable by rustfmt. +#[cfg(any())] +mod component; +#[cfg(any())] +mod cpu; +#[cfg(any())] +mod disk; +#[cfg(any())] +mod groups; +#[cfg(any())] +mod ios; +#[cfg(any())] +mod macos; +#[cfg(any())] +mod network; +#[cfg(any())] +mod process; +#[cfg(any())] +mod system; +#[cfg(any())] +mod users; diff --git a/src/unix/freebsd/mod.rs b/src/unix/freebsd/mod.rs index e1a8fdbd3..88b722573 100644 --- a/src/unix/freebsd/mod.rs +++ b/src/unix/freebsd/mod.rs @@ -41,3 +41,19 @@ cfg_if! { #[doc = include_str!("../../../md_doc/is_supported.md")] pub const IS_SUPPORTED_SYSTEM: bool = true; + +// Make formattable by rustfmt. +#[cfg(any())] +mod component; +#[cfg(any())] +mod cpu; +#[cfg(any())] +mod disk; +#[cfg(any())] +mod ffi; +#[cfg(any())] +mod network; +#[cfg(any())] +mod process; +#[cfg(any())] +mod system; diff --git a/src/unix/linux/mod.rs b/src/unix/linux/mod.rs index 3dabf51e8..cb521d3e6 100644 --- a/src/unix/linux/mod.rs +++ b/src/unix/linux/mod.rs @@ -40,3 +40,17 @@ cfg_if! { #[doc = include_str!("../../../md_doc/is_supported.md")] pub const IS_SUPPORTED_SYSTEM: bool = true; + +// Make formattable by rustfmt. +#[cfg(any())] +mod component; +#[cfg(any())] +mod cpu; +#[cfg(any())] +mod disk; +#[cfg(any())] +mod network; +#[cfg(any())] +mod process; +#[cfg(any())] +mod system; diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 0d6845c6e..3d640c42d 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -54,3 +54,17 @@ cfg_if! { } pub(crate) mod utils; + +// Make formattable by rustfmt. +#[cfg(any())] +mod apple; +#[cfg(any())] +mod freebsd; +#[cfg(any())] +mod groups; +#[cfg(any())] +mod linux; +#[cfg(any())] +mod network_helper; +#[cfg(any())] +mod users; diff --git a/src/unknown/mod.rs b/src/unknown/mod.rs index 1074b1b97..5ca00aeeb 100644 --- a/src/unknown/mod.rs +++ b/src/unknown/mod.rs @@ -41,3 +41,21 @@ cfg_if! { #[doc = include_str!("../../md_doc/is_supported.md")] pub const IS_SUPPORTED_SYSTEM: bool = false; + +// Make formattable by rustfmt. +#[cfg(any())] +mod component; +#[cfg(any())] +mod cpu; +#[cfg(any())] +mod disk; +#[cfg(any())] +mod groups; +#[cfg(any())] +mod network; +#[cfg(any())] +mod process; +#[cfg(any())] +mod system; +#[cfg(any())] +mod users; diff --git a/src/windows/mod.rs b/src/windows/mod.rs index d3d9e196b..77fb68b35 100644 --- a/src/windows/mod.rs +++ b/src/windows/mod.rs @@ -50,3 +50,25 @@ cfg_if! { #[doc = include_str!("../../md_doc/is_supported.md")] pub const IS_SUPPORTED_SYSTEM: bool = true; + +// Make formattable by rustfmt. +#[cfg(any())] +mod component; +#[cfg(any())] +mod cpu; +#[cfg(any())] +mod disk; +#[cfg(any())] +mod groups; +#[cfg(any())] +mod network; +#[cfg(any())] +mod network_helper; +#[cfg(any())] +mod process; +#[cfg(any())] +mod sid; +#[cfg(any())] +mod system; +#[cfg(any())] +mod users;