Change Rust generated file defaults (#7101)

* Change Rust generated file defaults

After #6731, flatc changed its default behavior
for generating rust code to fix some importing issues.
This was a breaking change which invlidated the patch release,
`flatc 2.0.5` (#7081). This PR reverses the default so we can
release a patch update. However, does break Rust users who work at
HEAD.

* Bump flatc patch version (2.0.6)

Co-authored-by: Casper Neo <cneo@google.com>
This commit is contained in:
Casper
2022-02-15 11:48:42 -05:00
committed by GitHub
parent 3413c33004
commit 615616cb55
26 changed files with 35 additions and 26 deletions

View File

@@ -140,7 +140,7 @@
#define FLATBUFFERS_VERSION_MAJOR 2
#define FLATBUFFERS_VERSION_MINOR 0
#define FLATBUFFERS_VERSION_REVISION 5
#define FLATBUFFERS_VERSION_REVISION 6
#define FLATBUFFERS_STRING_EXPAND(X) #X
#define FLATBUFFERS_STRING(X) FLATBUFFERS_STRING_EXPAND(X)
namespace flatbuffers {

View File

@@ -633,6 +633,9 @@ struct IDLOptions {
// If set, implement serde::Serialize for generated Rust types
bool rust_serialize;
// If set, generate rust types in individual files with a root module file.
bool rust_module_root_file;
// The corresponding language bit will be set if a language is included
// for code generation.
unsigned long lang_to_generate;
@@ -698,6 +701,7 @@ struct IDLOptions {
mini_reflect(IDLOptions::kNone),
require_explicit_ids(false),
rust_serialize(false),
rust_module_root_file(false),
lang_to_generate(0),
set_empty_strings_to_null(true),
set_empty_vectors_to_null(true) {}