summaryrefslogtreecommitdiffstats
path: root/src/app/data_harvester/batteries.rs
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2022-06-02 03:24:30 -0400
committerGitHub <noreply@github.com>2022-06-02 03:24:30 -0400
commit8689492ae5f4b2b7ae63f28755745ef8f8e7b0a5 (patch)
treecf3f1d36034ea9f2c26f6eb7954a5ff93109fb44 /src/app/data_harvester/batteries.rs
parentdae3c07cd79a1d4666220c6ed03e1ec49e424832 (diff)
refactor: unify all mod.rs structure to 2018 style (#742)
This is a pretty small change, but at least _for now_, unifies all `mod.rs` use cases to the 2018 style for consistency. I personally don't mind going back to it on a case-by-case basis in the future if it results in cleaner code, though.
Diffstat (limited to 'src/app/data_harvester/batteries.rs')
-rw-r--r--src/app/data_harvester/batteries.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/app/data_harvester/batteries.rs b/src/app/data_harvester/batteries.rs
new file mode 100644
index 00000000..8c0e4a92
--- /dev/null
+++ b/src/app/data_harvester/batteries.rs
@@ -0,0 +1,10 @@
+//! Data collection for batteries.
+//!
+//! For Linux, macOS, Windows, FreeBSD, Dragonfly, and iOS, this is handled by the battery crate.
+
+cfg_if::cfg_if! {
+ if #[cfg(any(target_os = "windows", target_os = "macos", target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "ios"))] {
+ pub mod battery;
+ pub use self::battery::*;
+ }
+}