diff --git a/rust/src/mqtt.rs b/rust/src/mqtt.rs index 6f37678..2d5718f 100644 --- a/rust/src/mqtt.rs +++ b/rust/src/mqtt.rs @@ -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,