refactor: use crate::util::mk_static in mqtt module
This commit is contained in:
@@ -110,14 +110,7 @@ async fn publish_inner(subtopic: &str, message: &str) -> FatResult<()> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! mk_static {
|
use crate::util::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
|
|
||||||
}};
|
|
||||||
}
|
|
||||||
|
|
||||||
pub async fn mqtt_init(
|
pub async fn mqtt_init(
|
||||||
network_config: &'static NetworkConfig,
|
network_config: &'static NetworkConfig,
|
||||||
|
|||||||
Reference in New Issue
Block a user