From c04ce0b5fe52ca955e703cea10a07dd82d6d6d17 Mon Sep 17 00:00:00 2001 From: raven <7156279+RavenX8@users.noreply.github.com> Date: Thu, 28 Nov 2024 00:43:07 -0500 Subject: [PATCH] - add: missing derive directives --- generator/src/codegen/rust/codegen_source.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/generator/src/codegen/rust/codegen_source.rs b/generator/src/codegen/rust/codegen_source.rs index eb8ec4a..1147a47 100644 --- a/generator/src/codegen/rust/codegen_source.rs +++ b/generator/src/codegen/rust/codegen_source.rs @@ -252,6 +252,7 @@ impl<'a, W: Write> CodeSourceGenerator<'a, W> { if is_enum { cg!(self, r#"#[repr({})]"#, rust_type); + cg!(self, r#"#[derive(Debug, Encode, Decode)]"#); cg!(self, "enum {} {{", name.to_upper_camel_case()); self.indent(); for content in restrict.contents() { @@ -261,6 +262,7 @@ impl<'a, W: Write> CodeSourceGenerator<'a, W> { } } } else { + cg!(self, r#"#[derive(Debug, Encode, Decode)]"#); cg!(self, "struct {} {{", name.to_upper_camel_case()); self.indent(); cg!(self, "{}: {},", name.to_string().to_snake_case(), rust_type);