From 13d6b44f2c2ee8ba71e6ddccbf250f92ecc07618 Mon Sep 17 00:00:00 2001 From: ju6ge Date: Sun, 10 May 2026 13:52:01 +0200 Subject: [PATCH] refactor: use crate::util::mk_static in mqtt module --- rust/src/mqtt.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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,