-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prost-build:
CodeGenerator::boxed
method (#1019)
* prost-build: CodeGenerator::boxed method 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. * prost-build: more reuse with CodeGenerator::boxed The bit in CodeGenerator::append_oneof was pretty much the same, except the configuration is looked up for the oneof name. Rearrange the logic so that intermediate values are bound when needed. If a repeated fields is configured to be boxed, a deprecation warning will be emitted by the build script. * prost-build: document CodeGenerator::boxed * prost-build: only emit warning on repeated fields Co-authored-by: Casper Meijn <casper@meijn.net> --------- Co-authored-by: Casper Meijn <casper@meijn.net>
- Loading branch information
1 parent
2308ba4
commit 1f38ea6
Showing
1 changed file
with
49 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters