tokio-rs / prost

PROST! a Protocol Buffers implementation for the Rust Language
Apache License 2.0
3.69k stars 481 forks source link

prost-build: `CodeGenerator::boxed` method #1019

Closed mzabaluev closed 2 months ago

mzabaluev commented 4 months ago

A helper method to capture the logic of deciding whether a field needs to be boxed. This follows the pattern with other methods like optional, and will allow reusing the logic in the upcoming builder codegen in #901.

mzabaluev commented 4 months ago

At line 626, there is another instance of a boxed variable. Can that be replaced by the same function?

Done, with some complication and a questionable behavioral change that I have commented on above.

caspermeijn commented 2 months ago

Thank you for your contribution. I appreciate your patience during the review.