Rust soundness fixes (#7518)

* Rust soundness fixes

* Second pass

* Make init_from_table unsafe

* Remove SafeSliceAccess

* Clippy

* Remove create_vector_of_strings

* More clippy

* Remove deprecated root type accessors

* More soundness fixes

* Fix EndianScalar for bool

* Add TriviallyTransmutable

* Add debug assertions

* Review comments

* Review feedback
This commit is contained in:
Raphael Taylor-Davies
2022-09-29 14:58:49 +01:00
committed by GitHub
parent dadbff5714
commit 374f8fb5fb
102 changed files with 2673 additions and 2035 deletions

View File

@@ -36,8 +36,8 @@ fn create_serialized_example_with_generated_code(builder: &mut flatbuffers::Flat
)
.as_union_value(),
),
inventory: Some(builder.create_vector_direct(&[0u8, 1, 2, 3, 4][..])),
test4: Some(builder.create_vector_direct(&[
inventory: Some(builder.create_vector(&[0u8, 1, 2, 3, 4])),
test4: Some(builder.create_vector(&[
my_game::example::Test::new(10, 20),
my_game::example::Test::new(30, 40),
])),