Fix internal HookCallback type (missing optional Send)

This commit is contained in:
Alex Orlenko
2021-09-20 12:13:36 +01:00
parent 35eedd5a5e
commit 3597e34ffb
+4
View File
@@ -47,6 +47,10 @@ pub(crate) struct AsyncPollUpvalue<'lua> {
pub(crate) fut: LocalBoxFuture<'lua, Result<MultiValue<'lua>>>,
}
#[cfg(feature = "send")]
pub(crate) type HookCallback = Arc<RefCell<dyn FnMut(&Lua, Debug) -> Result<()> + Send>>;
#[cfg(not(feature = "send"))]
pub(crate) type HookCallback = Arc<RefCell<dyn FnMut(&Lua, Debug) -> Result<()>>>;
#[cfg(feature = "send")]