This is an automated email from the ASF dual-hosted git repository.
yangyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/dubbo-rust.git
The following commit(s) were added to refs/heads/main by this push:
new d5b5b83 Fix: `#[serde(default)]` can only be used on structs (#162)
d5b5b83 is described below
commit d5b5b83489c774854e9a74ba3d4faf04c704eb9f
Author: liudada114 <[email protected]>
AuthorDate: Sat Oct 7 23:21:04 2023 +0800
Fix: `#[serde(default)]` can only be used on structs (#162)
Co-authored-by: liukaijie <[email protected]>
---
dubbo-build/src/prost.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dubbo-build/src/prost.rs b/dubbo-build/src/prost.rs
index 1cd92f6..8386469 100644
--- a/dubbo-build/src/prost.rs
+++ b/dubbo-build/src/prost.rs
@@ -94,7 +94,7 @@ impl Builder {
};
config.out_dir(out_dir);
config.type_attribute(".", "#[derive(serde::Serialize,
serde::Deserialize)]");
- config.type_attribute(".", "#[serde(default)]");
+ config.message_attribute(".", "#[serde(default)]");
if self.compile_well_known_types {
config.compile_well_known_types();