mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-07 13:53:38 +00:00
[Rust] Add support for fixed size arrays (#6548)
* Add support for fixed size arrays * clang-format * Update rust image to 1.51 to support const generics * Handle correctly big endian * Add fuzz tests and clean code * Add struct fuzz test and optimize struct arrays for api * Bump flatbuffers crate version
This commit is contained in:
@@ -7,7 +7,7 @@ use std::mem;
|
||||
use std::cmp::Ordering;
|
||||
|
||||
extern crate flatbuffers;
|
||||
use self::flatbuffers::EndianScalar;
|
||||
use self::flatbuffers::{EndianScalar, Follow};
|
||||
|
||||
#[allow(unused_imports, dead_code)]
|
||||
pub mod my_game {
|
||||
@@ -17,7 +17,7 @@ pub mod my_game {
|
||||
use std::cmp::Ordering;
|
||||
|
||||
extern crate flatbuffers;
|
||||
use self::flatbuffers::EndianScalar;
|
||||
use self::flatbuffers::{EndianScalar, Follow};
|
||||
#[allow(unused_imports, dead_code)]
|
||||
pub mod other_name_space {
|
||||
|
||||
@@ -26,7 +26,7 @@ pub mod other_name_space {
|
||||
use std::cmp::Ordering;
|
||||
|
||||
extern crate flatbuffers;
|
||||
use self::flatbuffers::EndianScalar;
|
||||
use self::flatbuffers::{EndianScalar, Follow};
|
||||
|
||||
#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")]
|
||||
pub const ENUM_MIN_FROM_INCLUDE: i64 = 0;
|
||||
@@ -173,7 +173,7 @@ impl<'a> flatbuffers::Verifiable for Unused {
|
||||
v.in_buffer::<Self>(pos)
|
||||
}
|
||||
}
|
||||
impl Unused {
|
||||
impl<'a> Unused {
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn new(
|
||||
a: i32,
|
||||
|
||||
Reference in New Issue
Block a user