build: fix dead_code warnings without "app" feature

This commit is contained in:
electria 2026-08-17 15:11:18 -07:00
commit afa6104c28
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs
2 changed files with 2 additions and 0 deletions

View file

@ -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)
}

View file

@ -1,3 +1,4 @@
#[cfg_attr(not(feature = "app"), allow(dead_code))]
pub trait Toggle {
fn toggle(&mut self);
}