diff options
author | sssooonnnggg <kevinsong@lilith.com> | 2023-05-18 01:54:49 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-17 19:54:49 +0200 |
commit | cb14043f820271287ec0a487467612c1932c80f9 (patch) | |
tree | 8ae3116ae7e02980412feefa5b15599e2cf08199 /src | |
parent | d64dc6200a959738b5e3260d74b8e736e81a5af4 (diff) | |
download | flatbuffers-cb14043f820271287ec0a487467612c1932c80f9.tar.gz flatbuffers-cb14043f820271287ec0a487467612c1932c80f9.tar.bz2 flatbuffers-cb14043f820271287ec0a487467612c1932c80f9.zip |
fix(rust): fixed rust namer isses, resolve #7865 and ##7782 (#7964)
Co-authored-by: Derek Bailey <derekbailey@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/idl_namer.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/idl_namer.h b/src/idl_namer.h index 7f89433d..337ac920 100644 --- a/src/idl_namer.h +++ b/src/idl_namer.h @@ -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: |