refactor: use crate::util::mk_static in mqtt module

This commit is contained in:
2026-05-10 13:52:01 +02:00
parent 9256a83c15
commit 13d6b44f2c

View File

@@ -110,14 +110,7 @@ async fn publish_inner(subtopic: &str, message: &str) -> FatResult<()> {
}
}
macro_rules! mk_static {
($t:ty,$val:expr) => {{
static STATIC_CELL: static_cell::StaticCell<$t> = static_cell::StaticCell::new();
#[deny(unused_attributes)]
let x = STATIC_CELL.uninit().write(($val));
x
}};
}
use crate::util::mk_static;
pub async fn mqtt_init(
network_config: &'static NetworkConfig,