build: fix dead_code warnings without "app" feature
This commit is contained in:
parent
a894a02e66
commit
afa6104c28
2 changed files with 2 additions and 0 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#[cfg_attr(not(feature = "app"), allow(dead_code))]
|
||||
pub trait Toggle {
|
||||
fn toggle(&mut self);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue