Skip to content

Commit c04ce0b

Browse files
committed
- add: missing derive directives
1 parent c26e650 commit c04ce0b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

generator/src/codegen/rust/codegen_source.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ impl<'a, W: Write> CodeSourceGenerator<'a, W> {
252252

253253
if is_enum {
254254
cg!(self, r#"#[repr({})]"#, rust_type);
255+
cg!(self, r#"#[derive(Debug, Encode, Decode)]"#);
255256
cg!(self, "enum {} {{", name.to_upper_camel_case());
256257
self.indent();
257258
for content in restrict.contents() {
@@ -261,6 +262,7 @@ impl<'a, W: Write> CodeSourceGenerator<'a, W> {
261262
}
262263
}
263264
} else {
265+
cg!(self, r#"#[derive(Debug, Encode, Decode)]"#);
264266
cg!(self, "struct {} {{", name.to_upper_camel_case());
265267
self.indent();
266268
cg!(self, "{}: {},", name.to_string().to_snake_case(), rust_type);

0 commit comments

Comments
 (0)