Skip to content

Commit a8f365f

Browse files
committed
Fix tests failures
1 parent 65da8c0 commit a8f365f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

prost-build/src/code_generator.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ impl<'a> CodeGenerator<'a> {
234234
self.push_indent();
235235
self.buf
236236
.push_str("#[allow(clippy::derive_partial_eq_without_eq)]\n");
237+
self.push_indent();
237238
self.buf.push_str(&format!(
238239
"#[derive(Clone, {}PartialEq, {}::Message)]\n",
239240
if self.message_graph.can_message_derive_copy(&fq_message_name) {
@@ -670,6 +671,8 @@ impl<'a> CodeGenerator<'a> {
670671
self.message_graph
671672
.can_field_derive_copy(fq_message_name, &field.descriptor)
672673
});
674+
675+
self.push_indent();
673676
self.buf.push_str(&format!(
674677
"#[derive(Clone, {}PartialEq, {}::Oneof)]\n",
675678
if can_oneof_derive_copy { "Copy, " } else { "" },
@@ -840,7 +843,7 @@ impl<'a> CodeGenerator<'a> {
840843
.map(|proto_name| format!("proto_name = \"{proto_name}\""))
841844
.join(", ");
842845

843-
self.buf.push_str(&format!("#[prost(json({names}))]"));
846+
self.buf.push_str(&format!("#[prost(json({names}))]\n"));
844847
};
845848

846849
self.append_field_attributes(&fq_proto_enum_name, variant.proto_name);

0 commit comments

Comments
 (0)