better calling for Handler

This commit is contained in:
2024-12-19 01:02:04 +01:00
parent 97141eae77
commit 8fd17e8195
4 changed files with 16 additions and 19 deletions
-12
View File
@@ -1,15 +1,3 @@
#[macro_export]
macro_rules! call {
($self:ident.$handler:ident ($($inner:tt)*)) => {{
let a = std::sync::Arc::clone(&$self.$handler.0);
let mut o = a.lock().unwrap();
o($self, $($inner)*);
}};
($self:ident.$handler:ident) => {{
&$self.$handler;
}};
}
#[macro_export]
macro_rules! launch {
($expr:expr) => {