Skip to content

Commit

Permalink
Make all source files visible to rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Nov 26, 2024
1 parent a95a8c5 commit ab99a39
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
///
Expand Down
14 changes: 14 additions & 0 deletions src/unix/apple/macos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
22 changes: 22 additions & 0 deletions src/unix/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
16 changes: 16 additions & 0 deletions src/unix/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
14 changes: 14 additions & 0 deletions src/unix/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
14 changes: 14 additions & 0 deletions src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
18 changes: 18 additions & 0 deletions src/unknown/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
22 changes: 22 additions & 0 deletions src/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit ab99a39

Please sign in to comment.