diff --git a/src/main.rs b/src/main.rs index c0d9e3a..bddb837 100644 --- a/src/main.rs +++ b/src/main.rs @@ -31,7 +31,6 @@ use log::{error, info, warn}; extern crate alloc; mod applogic; -#[cfg(feature = "spat")] mod cache; mod geo_alg; mod io; @@ -405,17 +404,20 @@ fn handle_frame(frame: wifi::sniffer::PromiscuousPkt<'_>) { } } +#[cfg(feature = "spat")] #[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] struct RatelimitData { station_id: u32, msg_count: u8, } +#[cfg(feature = "spat")] impl cache::Cachable for RatelimitData { fn key(&self) -> u32 { self.station_id } } +#[cfg(feature = "spat")] impl cache::Initable for RatelimitData { fn init(key: u32) -> Self { Self {