I'm using protobuf-codegen-pure = "2.3", and running into the following issue.
Given foo.proto:
message Foo {
optional string bar = 1 [default = "test"];
}
The generated 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`
I'm using
protobuf-codegen-pure = "2.3", and running into the following issue.Given
foo.proto:The generated
foo.rs:Fails to compile: