Closed YushuoEdge closed 1 year ago
Hi community! When encountering this issue, I think maybe the best solution is to add handling for empty values to field_entry
method (introduced by protobuf-codegen
crate). However, this might be a long-term solution. In the short term, we may need to add support for this clippy error in the generated code files. But I am not sure if this is appropriate. Would you happen to have any good suggestions?
We are currently building against 1.66 (https://github.com/containerd/ttrpc-rust/pull/179). I don't think we see this in CI. What happens if you upgrade your Rust version?
Thanks for your reply @jsturtevant!
This clippy error still exists when I upgrade the Rust version to 1.66 and higher. I think the problem in this issue is that the code generated by ttrpc-codegen
has clippy error, which may not be consistent with #179.
If I understand correctly, I found that in https://github.com/containerd/ttrpc-rust/blob/master/compiler/src/codegen.rs#L637-L658, it seems to allow some clippy in the generated files. I think this may be some similar cases.
When compiled with rust-1.60, the xxxClient::new() will introduce clippy error
redundant_field_names
: