main: Fix feature flags
This commit is contained in:
parent
21db09ad7f
commit
fc3581d0d1
1 changed files with 3 additions and 1 deletions
|
|
@ -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<u32> for RatelimitData {
|
||||
fn key(&self) -> u32 {
|
||||
self.station_id
|
||||
}
|
||||
}
|
||||
#[cfg(feature = "spat")]
|
||||
impl cache::Initable<Self, u32> for RatelimitData {
|
||||
fn init(key: u32) -> Self {
|
||||
Self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue