diff --git a/automation_macro/src/lua_device_config.rs b/automation_macro/src/lua_device_config.rs index 9a6542e..6dc12a1 100644 --- a/automation_macro/src/lua_device_config.rs +++ b/automation_macro/src/lua_device_config.rs @@ -260,8 +260,9 @@ pub fn impl_lua_device_config_macro(ast: &DeriveInput) -> TokenStream { }) .collect(); + let (impl_generics, type_generics, where_clause) = ast.generics.split_for_impl(); let impl_from_lua = quote! { - impl mlua::FromLua for #name { + impl #impl_generics mlua::FromLua for #name #type_generics #where_clause { fn from_lua(value: mlua::Value, lua: &mlua::Lua) -> mlua::Result { if !value.is_table() { panic!("Expected table");