diff --git a/src/mlu/teal_data_methods.rs b/src/mlu/teal_data_methods.rs index b5abb57..c422909 100644 --- a/src/mlu/teal_data_methods.rs +++ b/src/mlu/teal_data_methods.rs @@ -59,9 +59,9 @@ pub trait TealDataMethods<'lua, T: ToTypename> { #[cfg(feature = "mlua_async")] ///exposes an async function to lua - fn add_async_function(&mut self, name: &S, function: F) + fn add_async_function(&mut self, name: &S, function: F) where - S: AsRef, + S: AsRef + ?Sized, A: FromLuaMulti<'lua> + TealMultiValue, R: ToLuaMulti<'lua> + TealMultiValue, F: 'static + MaybeSend + Fn(&'lua Lua, A) -> FR, diff --git a/src/mlu/user_data_wrapper.rs b/src/mlu/user_data_wrapper.rs index 050e50b..fad4e51 100644 --- a/src/mlu/user_data_wrapper.rs +++ b/src/mlu/user_data_wrapper.rs @@ -248,9 +248,9 @@ where #[cfg(feature = "mlua_async")] #[inline(always)] - fn add_async_function(&mut self, name: &S, function: F) + fn add_async_function(&mut self, name: &S, function: F) where - S: AsRef, + S: AsRef + ?Sized, A: FromLuaMulti<'lua> + TealMultiValue, R: ToLuaMulti<'lua> + TealMultiValue, F: 'static + MaybeSend + Fn(&'lua Lua, A) -> FR, diff --git a/src/rlu/named_parameters.rs b/src/rlu/named_parameters.rs index e6e18fb..c79f623 100644 --- a/src/rlu/named_parameters.rs +++ b/src/rlu/named_parameters.rs @@ -68,9 +68,3 @@ macro_rules! rlua_create_named_parameters { } }; } - -rlua_create_named_parameters!( - TestStruct with - field_1 : String, - field_2 : i64, -); diff --git a/src/type_generator.rs b/src/type_generator.rs index e5d1644..dc49dab 100644 --- a/src/type_generator.rs +++ b/src/type_generator.rs @@ -821,9 +821,9 @@ where } #[cfg(feature = "mlua_async")] - fn add_async_function(&mut self, name: &S, _: F) + fn add_async_function(&mut self, name: &S, _: F) where - S: AsRef, + S: AsRef + ?Sized, A: FromLuaMultiM<'lua> + TealMultiValue, R: ToLuaMultiM<'lua> + TealMultiValue, F: 'static + MaybeSend + Fn(&'lua Lua, A) -> FR,