aboutsummaryrefslogtreecommitdiff
path: root/mingling_macros/src/dispatcher.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-05-21 15:02:50 +0800
committer魏曹先生 <1992414357@qq.com>2026-05-21 15:03:55 +0800
commit4704f6d54108bcc8f9b2fb7f4b3c4e224b4a7809 (patch)
tree425b15395de24717f9732d8642e75044774d4583 /mingling_macros/src/dispatcher.rs
parenta9755711b490529c26bdb4b024c6caf825940dd3 (diff)
Remove `once_cell` dependency and replace with `OnceLock`
Diffstat (limited to 'mingling_macros/src/dispatcher.rs')
-rw-r--r--mingling_macros/src/dispatcher.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/mingling_macros/src/dispatcher.rs b/mingling_macros/src/dispatcher.rs
index 9724fd1..e327d6b 100644
--- a/mingling_macros/src/dispatcher.rs
+++ b/mingling_macros/src/dispatcher.rs
@@ -208,10 +208,13 @@ pub fn register_dispatcher(input: TokenStream) -> TokenStream {
// Register node info in the global collection at compile time
// Format: "node.name:DispatcherType:EntryName"
- COMPILE_TIME_DISPATCHERS.lock().unwrap().insert(format!(
- "{}:{}:{}",
- node_name_str, dispatcher_type, entry_name
- ));
+ crate::get_global_set(&COMPILE_TIME_DISPATCHERS)
+ .lock()
+ .unwrap()
+ .insert(format!(
+ "{}:{}:{}",
+ node_name_str, dispatcher_type, entry_name
+ ));
let expanded = quote! {
#[doc(hidden)]