We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm using protobuf-codegen-pure = "2.3", and running into the following issue.
protobuf-codegen-pure = "2.3"
Given foo.proto:
foo.proto
message Foo { optional string bar = 1 [default = "test"]; }
The generated foo.rs:
foo.rs
impl Foo { pub fn mut_bar(&mut self) -> &mut ::protobuf::Chars { if self.bar.is_none() { self.bar = ::std::option::Option::Some("test"); } self.bar.as_mut().unwrap() } }
Fails to compile:
error[E0308]: mismatched types --> src/foo.rs:57:52 | 57 | self.bar = ::std::option::Option::Some("test"); | ^^^^^^ expected struct `protobuf::chars::Chars`, found reference | = note: expected type `protobuf::chars::Chars` found type `&'static str`
The text was updated successfully, but these errors were encountered:
Fix proto2 string field with bytes option and default value
9c9a3c8
Issue #395
e7966e8
Published fix as 2.3.1.
Thank you for the bugreport!
Sorry, something went wrong.
No branches or pull requests
I'm using
protobuf-codegen-pure = "2.3"
, and running into the following issue.Given
foo.proto
:The generated
foo.rs
:Fails to compile:
The text was updated successfully, but these errors were encountered: