Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ fn main() {
.compile_protos(&[src.join("option_enum.proto")], includes)
.unwrap();

config
prost_build::Config::new()
.compile_protos(&[src.join("option_struct.proto")], includes)
.unwrap();

Expand Down
5 changes: 2 additions & 3 deletions tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ mod option_enum;
#[cfg(test)]
mod result_enum;

mod test_result_named_option_value {
include!(concat!(env!("OUT_DIR"), "/mystruct.optionn.rs"));
}
#[cfg(test)]
mod option_struct;

#[cfg(test)]
mod result_struct;
Expand Down
3 changes: 1 addition & 2 deletions tests/src/option_struct.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
syntax = "proto3";
package mystruct.optionn;

package option_struct;

message Option {
string msg = 1;
Expand Down
8 changes: 8 additions & 0 deletions tests/src/option_struct.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
include!(concat!(env!("OUT_DIR"), "/option_struct.rs"));

#[test]
fn test_struct_named_option_value() {
let _ = Option {
msg: "Can I create?".into(),
};
}
Loading