mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-08 22:20:56 +00:00
Optional Scalars support for Rust (#6034)
* First draft of rust optionals * Code cleanup around ftBool and ftVectorOfBool * Tests for Rust optional scalars * test bools too Co-authored-by: Casper Neo <cneo@google.com>
This commit is contained in:
@@ -3457,9 +3457,11 @@ void NullableScalarsTest() {
|
||||
|
||||
// Test if nullable scalars are allowed for each language.
|
||||
const int kNumLanguages = 17;
|
||||
const auto supported = flatbuffers::IDLOptions::kRust;
|
||||
for (int lang=0; lang<kNumLanguages; lang++) {
|
||||
flatbuffers::IDLOptions opts;
|
||||
opts.lang_to_generate |= 1 << lang;
|
||||
if (opts.lang_to_generate & supported) continue;
|
||||
for (auto schema = schemas.begin(); schema < schemas.end(); schema++) {
|
||||
const bool has_null = schema->find("null") != std::string::npos;
|
||||
flatbuffers::Parser parser(opts);
|
||||
|
||||
Reference in New Issue
Block a user