Skip to content

Commit

Permalink
Fix tests failures
Browse files Browse the repository at this point in the history
  • Loading branch information
cynecx committed Aug 22, 2024
1 parent 306a2df commit 22ed7a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion prost-build/src/code_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,8 @@ impl<'a> CodeGenerator<'a> {
self.message_graph
.can_field_derive_copy(fq_message_name, &field.descriptor)
});

self.push_indent();
self.buf.push_str(&format!(
"#[derive(Clone, {}PartialEq, {}::Oneof)]\n",
if can_oneof_derive_copy { "Copy, " } else { "" },
Expand Down Expand Up @@ -836,7 +838,7 @@ impl<'a> CodeGenerator<'a> {
.map(|proto_name| format!("proto_name = \"{proto_name}\""))
.join(", ");

self.buf.push_str(&format!("#[prost(json({names}))]"));
self.buf.push_str(&format!("#[prost(json({names}))]\n"));
};

self.append_field_attributes(&fq_proto_enum_name, variant.proto_name);
Expand Down

0 comments on commit 22ed7a8

Please sign in to comment.