From afa6104c28d25caf3808424d4cae6b3031ab2d2e Mon Sep 17 00:00:00 2001 From: electria Date: Mon, 17 Aug 2026 15:11:18 -0700 Subject: [PATCH] build: fix dead_code warnings without "app" feature --- src/sysinfo_snapshot.rs | 1 + src/utils.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/sysinfo_snapshot.rs b/src/sysinfo_snapshot.rs index 6189cdb..917b2f6 100644 --- a/src/sysinfo_snapshot.rs +++ b/src/sysinfo_snapshot.rs @@ -13,6 +13,7 @@ pub struct SysinfoSnapshot { pub swap_total: u64, } impl SysinfoSnapshot { + #[cfg_attr(not(feature = "app"), allow(dead_code))] pub fn uptime(&self) -> Duration { Duration::from_secs(self.uptime) } diff --git a/src/utils.rs b/src/utils.rs index 3556bf9..622bff1 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,3 +1,4 @@ +#[cfg_attr(not(feature = "app"), allow(dead_code))] pub trait Toggle { fn toggle(&mut self); }