mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-25 22:28:38 +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:
@@ -81,9 +81,9 @@ impl<'a> Ability {
|
||||
s
|
||||
}
|
||||
|
||||
pub const fn get_fully_qualified_name() -> &'static str {
|
||||
"MyGame.Example.Ability"
|
||||
}
|
||||
pub const fn get_fully_qualified_name() -> &'static str {
|
||||
"MyGame.Example.Ability"
|
||||
}
|
||||
|
||||
pub fn id(&self) -> u32 {
|
||||
let mut mem = core::mem::MaybeUninit::<u32>::uninit();
|
||||
@@ -109,12 +109,12 @@ impl<'a> Ability {
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn key_compare_less_than(&self, o: &Ability) -> bool {
|
||||
pub fn key_compare_less_than(&self, o: &Ability) -> bool {
|
||||
self.id() < o.id()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn key_compare_with_value(&self, val: u32) -> ::std::cmp::Ordering {
|
||||
pub fn key_compare_with_value(&self, val: u32) -> ::std::cmp::Ordering {
|
||||
let key = self.id();
|
||||
key.cmp(&val)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user