diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-05-21 15:02:50 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-05-21 15:03:55 +0800 |
| commit | 4704f6d54108bcc8f9b2fb7f4b3c4e224b4a7809 (patch) | |
| tree | 425b15395de24717f9732d8642e75044774d4583 /mingling_macros/src/dispatcher.rs | |
| parent | a9755711b490529c26bdb4b024c6caf825940dd3 (diff) | |
Remove `once_cell` dependency and replace with `OnceLock`
Diffstat (limited to 'mingling_macros/src/dispatcher.rs')
| -rw-r--r-- | mingling_macros/src/dispatcher.rs | 11 |
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)] |
