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
For example for:
enum AliasedEnum { option allow_alias = true; ALIAS_FOO = 0; ALIAS_BAR = 1; ALIAS_BAZ = 2; MOO = 2; moo = 2; bAz = 2; }
pbjson_build generates:
impl serde::Serialize for AliasedEnum { #[allow(deprecated)] fn serialize<S>(&self, serializer: S) -> std::result::Result<S::Ok, S::Error> where S: serde::Serializer, { let variant = match self { Self::AliasFoo => "ALIAS_FOO", Self::AliasBar => "ALIAS_BAR", Self::AliasBaz => "ALIAS_BAZ", Self::Moo => "MOO", Self::Moo => "moo", Self::BAz => "bAz", }; serializer.serialize_str(variant) } }
while prost-build generates:
#[repr(i32)] pub enum AliasedEnum { AliasFoo = 0, AliasBar = 1, AliasBaz = 2, }
i.e. pbjson_build incorrectly assumes that there are no aliases and thinks that each alias has its own rust enum variant.
The text was updated successfully, but these errors were encountered:
Closed by #103
Sorry, something went wrong.
No branches or pull requests
For example for:
pbjson_build generates:
while prost-build generates:
i.e. pbjson_build incorrectly assumes that there are no aliases and thinks that each alias has its own rust enum variant.
The text was updated successfully, but these errors were encountered: