Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Build error due to merge conflict #1068

Merged
merged 1 commit into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions prost-build/src/code_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,9 +619,9 @@ impl<'a> CodeGenerator<'a> {
self.buf
.push_str("#[allow(clippy::derive_partial_eq_without_eq)]\n");

let can_oneof_derive_copy = fields.iter().map(|(field, _idx)| field).all(|field| {
let can_oneof_derive_copy = oneof.fields.iter().all(|field| {
self.message_graph
.can_field_derive_copy(fq_message_name, field)
.can_field_derive_copy(fq_message_name, &field.descriptor)
});
self.buf.push_str(&format!(
"#[derive(Clone, {}PartialEq, {}::Oneof)]\n",
Expand Down
1 change: 1 addition & 0 deletions tests/src/derive_copy.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include!(concat!(env!("OUT_DIR"), "/derive_copy.rs"));

#[allow(dead_code)]
trait TestCopyIsImplemented: Copy {}

impl TestCopyIsImplemented for EmptyMsg {}
Expand Down
Loading