File tree Expand file tree Collapse file tree 4 files changed +12
-6
lines changed
Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ fn main() {
121121 . compile_protos ( & [ src. join ( "option_enum.proto" ) ] , includes)
122122 . unwrap ( ) ;
123123
124- config
124+ prost_build :: Config :: new ( )
125125 . compile_protos ( & [ src. join ( "option_struct.proto" ) ] , includes)
126126 . unwrap ( ) ;
127127
Original file line number Diff line number Diff line change @@ -89,9 +89,8 @@ mod option_enum;
8989#[ cfg( test) ]
9090mod result_enum;
9191
92- mod test_result_named_option_value {
93- include ! ( concat!( env!( "OUT_DIR" ) , "/mystruct.optionn.rs" ) ) ;
94- }
92+ #[ cfg( test) ]
93+ mod option_struct;
9594
9695#[ cfg( test) ]
9796mod result_struct;
Original file line number Diff line number Diff line change 11syntax = "proto3" ;
2- package mystruct.optionn ;
3-
2+ package option_struct ;
43
54message Option {
65 string msg = 1 ;
Original file line number Diff line number Diff line change 1+ include ! ( concat!( env!( "OUT_DIR" ) , "/option_struct.rs" ) ) ;
2+
3+ #[ test]
4+ fn test_struct_named_option_value ( ) {
5+ let _ = Option {
6+ msg : "Can I create?" . into ( ) ,
7+ } ;
8+ }
You can’t perform that action at this time.
0 commit comments