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
It seems there is a bug in SingularField<T>::unwrap_or_default implementation: https://github.com/stepancheg/rust-protobuf/blob/v2.25.1/protobuf/src/singular.rs#L343. It is not clear why should unwrap_or_default call self.value.clear().
SingularField<T>::unwrap_or_default
unwrap_or_default
self.value.clear()
As an example for ::protobuf::SingularField<::std::string::String> type unwrap_or_default always returns empty string.
::protobuf::SingularField<::std::string::String>
The text was updated successfully, but these errors were encountered:
Fix SingularField::unwrap_or_default
717e645
Fixes #572
Thanks!
Sorry, something went wrong.
No branches or pull requests
It seems there is a bug in
SingularField<T>::unwrap_or_default
implementation: https://github.com/stepancheg/rust-protobuf/blob/v2.25.1/protobuf/src/singular.rs#L343.It is not clear why should
unwrap_or_default
callself.value.clear()
.As an example for
::protobuf::SingularField<::std::string::String>
type unwrap_or_default always returns empty string.The text was updated successfully, but these errors were encountered: