File tree Expand file tree Collapse file tree
examples/file-descriptor-set Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ fn main() {
99 Config :: new ( )
1010 . no_clone_impl ( true )
1111 . no_partial_eq_impl ( true )
12- . minimal_accessors ( true ) ,
12+ . no_accessors ( true ) ,
1313 )
1414 // Override minimal accessors setting for specific paths, since the generator calls `set_`
1515 // APIs on specific messages
@@ -22,7 +22,7 @@ fn main() {
2222 ".google.protobuf.MessageOptions" ,
2323 ".google.protobuf.EnumValueDescriptorProto" ,
2424 ] ,
25- Config :: new ( ) . minimal_accessors ( false ) ,
25+ Config :: new ( ) . no_accessors ( false ) ,
2626 )
2727 . compile_protos ( & [ "google/protobuf/descriptor.proto" ] , "descriptor.rs" )
2828 . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -952,15 +952,15 @@ impl Generator {
952952 self
953953 }
954954
955- /// Do not generate code to calculate the `MAX_SIZE` constant on each message.
955+ /// Determine whether to generate code to calculate the `MAX_SIZE` constant on each message.
956956 ///
957957 /// By default, `micropb-gen` generates code to calculate the `MAX_SIZE` associated constant
958958 /// for each message struct, which determines the max buffer size needed to encode it. If this
959959 /// is set to false, then it replaces the calculations with `None`, effectively disabling the
960960 /// use of `MAX_SIZE`. This has no runtime impact, but it can reduce the size of the output
961961 /// file.
962- pub fn calculate_max_size ( & mut self ) -> & mut Self {
963- self . calculate_max_size = true ;
962+ pub fn calculate_max_size ( & mut self , flag : bool ) -> & mut Self {
963+ self . calculate_max_size = flag ;
964964 self
965965 }
966966}
You can’t perform that action at this time.
0 commit comments