better calling for Handler
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user