dropbox / pb-jelly

A protobuf code generation framework for the Rust language developed at Dropbox.
Apache License 2.0
610 stars 25 forks source link

Add a test for non-optional Box'ed messages #84

Closed ParkMyCar closed 3 years ago

ParkMyCar commented 3 years ago

This PR adds a test to assert we generate the correct code for non-optional Box'ed messages, e.g.

message Foo {
    message Bar {}

    Bar bar = 1 [(rust.box_it)=true, (gogoproto.nullable)=false];
}

Note: Most of the time user's will run into this case unknowingly, because of the automatic boxing we do for recursive message definitions