fix(rust): fixed rust namer isses, resolve #7865 and ##7782 (#7964)

Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
sssooonnnggg
2023-05-18 01:54:49 +08:00
committed by GitHub
parent d64dc6200a
commit cb14043f82
13 changed files with 1329 additions and 1 deletions

View File

@@ -146,7 +146,8 @@ class IdlNamer : public Namer {
std::string LegacyRustUnionTypeMethod(const FieldDef &d) {
// assert d is a union
return Method(d.name + "_type");
// d should convert case but not escape keywords due to historical reasons
return ConvertCase(d.name, config_.fields, Case::kLowerCamel) + "_type";
}
private: