mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-10 07:06:26 +00:00
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:
@@ -194,7 +194,7 @@ bool IsOptionalToBuilder(const FieldDef &field) {
|
||||
|
||||
bool GenerateRustModuleRootFile(const Parser &parser,
|
||||
const std::string &output_dir) {
|
||||
if (parser.opts.one_file) {
|
||||
if (!parser.opts.rust_module_root_file) {
|
||||
// Don't generate a root file when generating one file. This isn't an error
|
||||
// so return true.
|
||||
return true;
|
||||
@@ -371,7 +371,7 @@ class RustGenerator : public BaseGenerator {
|
||||
}
|
||||
|
||||
bool generate() {
|
||||
if (parser_.opts.one_file) {
|
||||
if (!parser_.opts.rust_module_root_file) {
|
||||
return GenerateOneFile();
|
||||
} else {
|
||||
return GenerateIndividualFiles();
|
||||
|
||||
Reference in New Issue
Block a user