Commit 35e3f28
authored
* refactor(prost-build): Context
Move global context data and logic around it from CodeGenerator
to a new Context struct. Also move the logic of can_message_derive_copy
and can_field_derive_copy from MessageGraph where it caused some
data duplication.
* chore: make CodeGenerator::generate crate-private
It was not obvious immediately from the declaration that
CodeGenerator is private to the crate.
* docs(prost-build): life of Context, CodeGenerator
Add doc comments clarifying the lifetime of `Context` and
`CodeGenerator` in the code generation process.
* refactor: CodeGenerator::config helper
* refactor: rename Context::service_generator
Rename to service_generator_mut so it's evident that we are obtaining
a mutable reference even though the Context reference is shared.
* chore: revert can_message_derive_copy behavior
Avoid behavioral changes in the Context refactoring.
* chore: revert should_disable_comments behavior
Avoid behavioral changes in the Context refactoring.
* chore: elide a lifetime in CodeGenerator impl
To please clippy.
1 parent 6445907 commit 35e3f28
File tree
5 files changed
+329
-198
lines changed- prost-build/src
5 files changed
+329
-198
lines changed
0 commit comments