Implement Debug trait for Rust flatbuffers. (#6207)

* Refactor idl_gen_rust to a ForAllX continuation pattern.

* Removed unneeded SetValue and updated sample rust gencode

* Make Rust flatbuffers print right

* Generated code and removed unnecessary trait constraint

* bumped rust version. Release required

* removed an unwrap in Rust Debug-print unions

* Tested formatting flatbuffers in rust.

* Set float precision in flaky debug-print test

* impl Debug for structs too

Co-authored-by: Casper Neo <cneo@google.com>
This commit is contained in:
Casper
2020-10-29 12:57:29 -07:00
committed by GitHub
parent 17ae48decc
commit b08b0a4402
12 changed files with 508 additions and 27 deletions

View File

@@ -88,7 +88,7 @@ TEST_CPP17_FLAGS="--cpp --cpp-std c++17 -o ./cpp17/generated_cpp17 $TEST_NOINCL_
../flatc $TEST_CPP17_FLAGS optional_scalars.fbs
cd ../samples
../flatc --cpp --lobster $TEST_BASE_FLAGS $TEST_CPP_FLAGS monster.fbs
../flatc --cpp --rust --lobster $TEST_BASE_FLAGS $TEST_CPP_FLAGS monster.fbs
../flatc -b --schema --bfbs-comments --bfbs-builtins monster.fbs
cd ../reflection
./generate_code.sh --cpp-std c++0x