mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-03 22:34:13 +00:00
Generate better formatted Rust code (#8919)
* Cleans up Rust formatting * Regenerates generated schemas
This commit is contained in:
@@ -2,15 +2,17 @@
|
||||
// @generated
|
||||
extern crate alloc;
|
||||
use super::*;
|
||||
pub enum InParentNamespaceOffset {}
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
|
||||
pub enum InParentNamespaceOffset {}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
pub struct InParentNamespace<'a> {
|
||||
pub _tab: ::flatbuffers::Table<'a>,
|
||||
}
|
||||
|
||||
impl<'a> ::flatbuffers::Follow<'a> for InParentNamespace<'a> {
|
||||
type Inner = InParentNamespace<'a>;
|
||||
|
||||
#[inline]
|
||||
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
|
||||
Self { _tab: unsafe { ::flatbuffers::Table::new(buf, loc) } }
|
||||
@@ -18,7 +20,6 @@ impl<'a> ::flatbuffers::Follow<'a> for InParentNamespace<'a> {
|
||||
}
|
||||
|
||||
impl<'a> InParentNamespace<'a> {
|
||||
|
||||
pub const fn get_fully_qualified_name() -> &'static str {
|
||||
"MyGame.InParentNamespace"
|
||||
}
|
||||
@@ -27,6 +28,7 @@ impl<'a> InParentNamespace<'a> {
|
||||
pub unsafe fn init_from_table(table: ::flatbuffers::Table<'a>) -> Self {
|
||||
InParentNamespace { _tab: table }
|
||||
}
|
||||
|
||||
#[allow(unused_mut)]
|
||||
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: ::flatbuffers::Allocator + 'bldr>(
|
||||
_fbb: &'mut_bldr mut ::flatbuffers::FlatBufferBuilder<'bldr, A>,
|
||||
@@ -52,8 +54,10 @@ impl ::flatbuffers::Verifiable for InParentNamespace<'_> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
pub struct InParentNamespaceArgs {
|
||||
}
|
||||
|
||||
impl<'a> Default for InParentNamespaceArgs {
|
||||
#[inline]
|
||||
fn default() -> Self {
|
||||
@@ -66,6 +70,7 @@ pub struct InParentNamespaceBuilder<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a
|
||||
fbb_: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>,
|
||||
start_: ::flatbuffers::WIPOffset<::flatbuffers::TableUnfinishedWIPOffset>,
|
||||
}
|
||||
|
||||
impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> InParentNamespaceBuilder<'a, 'b, A> {
|
||||
#[inline]
|
||||
pub fn new(_fbb: &'b mut ::flatbuffers::FlatBufferBuilder<'a, A>) -> InParentNamespaceBuilder<'a, 'b, A> {
|
||||
@@ -75,6 +80,7 @@ impl<'a: 'b, 'b, A: ::flatbuffers::Allocator + 'a> InParentNamespaceBuilder<'a,
|
||||
start_: start,
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn finish(self) -> ::flatbuffers::WIPOffset<InParentNamespace<'a>> {
|
||||
let o = self.fbb_.end_table(self.start_);
|
||||
@@ -88,16 +94,19 @@ impl ::core::fmt::Debug for InParentNamespace<'_> {
|
||||
ds.finish()
|
||||
}
|
||||
}
|
||||
|
||||
#[non_exhaustive]
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
pub struct InParentNamespaceT {
|
||||
}
|
||||
|
||||
impl Default for InParentNamespaceT {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl InParentNamespaceT {
|
||||
pub fn pack<'b, A: ::flatbuffers::Allocator + 'b>(
|
||||
&self,
|
||||
|
||||
Reference in New Issue
Block a user