Generate better formatted Rust code (#8919)

* Cleans up Rust formatting

* Regenerates generated schemas
This commit is contained in:
Cameron Mulhern
2026-03-04 21:49:46 -05:00
committed by GitHub
parent 9c383559e0
commit 08b6372a36
95 changed files with 2783 additions and 1062 deletions

View File

@@ -2,6 +2,7 @@
// @generated
extern crate alloc;
use super::*;
#[allow(non_upper_case_globals)]
mod bitflags_long_enum {
::flatbuffers::bitflags::bitflags! {
@@ -13,10 +14,12 @@ mod bitflags_long_enum {
}
}
}
pub use self::bitflags_long_enum::LongEnum;
impl<'a> ::flatbuffers::Follow<'a> for LongEnum {
type Inner = Self;
#[inline]
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
let b = unsafe { ::flatbuffers::read_scalar_at::<u64>(buf, loc) };
@@ -26,6 +29,7 @@ impl<'a> ::flatbuffers::Follow<'a> for LongEnum {
impl ::flatbuffers::Push for LongEnum {
type Output = LongEnum;
#[inline]
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
unsafe { ::flatbuffers::emplace_scalar::<u64>(dst, self.bits()) };
@@ -34,10 +38,12 @@ impl ::flatbuffers::Push for LongEnum {
impl ::flatbuffers::EndianScalar for LongEnum {
type Scalar = u64;
#[inline]
fn to_little_endian(self) -> u64 {
self.bits().to_le()
}
#[inline]
#[allow(clippy::wrong_self_convention)]
fn from_little_endian(v: u64) -> Self {