mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-26 11:12:40 +00:00
Refactor idl_gen_rust and Rust generated code to use consistent whitespace (#6809)
* Remove dead code in idl_gen_rust * Use 2space indentation in mod.rs * use In/DecrementIdentValue in idl_gen_rust Fix some whitespace too in generated code. * make default fn 2space ident * More 2space formatting * git clang format * make vs2015 happy Co-authored-by: Casper Neo <cneo@google.com>
This commit is contained in:
@@ -93,9 +93,9 @@ impl<'a> Vec3 {
|
||||
s
|
||||
}
|
||||
|
||||
pub const fn get_fully_qualified_name() -> &'static str {
|
||||
"MyGame.Example.Vec3"
|
||||
}
|
||||
pub const fn get_fully_qualified_name() -> &'static str {
|
||||
"MyGame.Example.Vec3"
|
||||
}
|
||||
|
||||
pub fn x(&self) -> f32 {
|
||||
let mut mem = core::mem::MaybeUninit::<f32>::uninit();
|
||||
@@ -216,7 +216,7 @@ impl<'a> Vec3 {
|
||||
unsafe { &*(self.0[26..].as_ptr() as *const Test) }
|
||||
}
|
||||
|
||||
#[allow(clippy::identity_op)]
|
||||
#[allow(clippy::identity_op)]
|
||||
pub fn set_test3(&mut self, x: &Test) {
|
||||
self.0[26..26 + 4].copy_from_slice(&x.0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user