From 4d161d8bc718f4a6138cd8d1efa90e1f97d3178d Mon Sep 17 00:00:00 2001 From: ByteOtter Date: Mon, 22 Jan 2024 15:18:47 +0100 Subject: [PATCH] add additional derive for types --- src/bindgen.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bindgen.rs b/src/bindgen.rs index b6ef935..8f9ceb8 100644 --- a/src/bindgen.rs +++ b/src/bindgen.rs @@ -314,7 +314,7 @@ pub fn gen(input_path: impl AsRef) { // Write description. types_file.write_all(desc.as_bytes()).unwrap(); // Write name. - types_file.write_all(b"pub struct ").unwrap(); + types_file.write_all(b"#[derive(Debug, Serialize, Deserialize, Default)]\npub struct ").unwrap(); types_file.write_all(name.as_bytes()).unwrap(); types_file.write_all(b" {\n").unwrap(); // For every struct field.