From 8f853d6e3c503f02cec7609bfb4930056f3ea223 Mon Sep 17 00:00:00 2001 From: Lenscas Date: Sun, 21 Jul 2024 14:55:48 +0200 Subject: [PATCH 1/2] removed dead code --- src/rlu/named_parameters.rs | 6 ------ 1 file changed, 6 deletions(-) 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, -); From 08c741489d65d68a8fdeecda6cea21f73415f97a Mon Sep 17 00:00:00 2001 From: Lenscas Date: Sun, 21 Jul 2024 15:00:03 +0200 Subject: [PATCH 2/2] fix more clippy warnings --- src/mlu/teal_data_methods.rs | 4 ++-- src/mlu/user_data_wrapper.rs | 4 ++-- src/type_generator.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) 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/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,