style: format macro + fix comment typos

This commit is contained in:
nativerv
2024-02-16 00:23:25 +03:00
parent 3f08d92e3a
commit c8521a7c97
2 changed files with 8 additions and 4 deletions
+3 -3
View File
@@ -51,7 +51,7 @@ pub trait ReflectImpl: Reflect + TypePath + FromReflect {}
pub trait InspectorEguiImpl: InspectorOptionsType {} pub trait InspectorEguiImpl: InspectorOptionsType {}
// ===== Action ===== // ===== Action =====
// SAFATY: inspector-egui includes reflect // SAFETY: inspector-egui includes reflect
#[cfg(all( #[cfg(all(
not(feature = "serialize"), not(feature = "serialize"),
not(feature = "reflect"), not(feature = "reflect"),
@@ -87,7 +87,7 @@ pub trait Action: ActionInner + ReflectImpl + InspectorEguiImpl {}
pub trait Action: ActionInner + SerializeImpl + ReflectImpl + InspectorEguiImpl {} pub trait Action: ActionInner + SerializeImpl + ReflectImpl + InspectorEguiImpl {}
// ===== GameState ===== // ===== GameState =====
// SAFATY: inspector-egui includes reflect // SAFETY: inspector-egui includes reflect
#[cfg(all( #[cfg(all(
not(feature = "serialize"), not(feature = "serialize"),
not(feature = "reflect"), not(feature = "reflect"),
@@ -123,7 +123,7 @@ pub trait GameState: GameStateInner + ReflectImpl + InspectorEguiImpl {}
pub trait GameState: GameStateInner + SerializeImpl + ReflectImpl + InspectorEguiImpl {} pub trait GameState: GameStateInner + SerializeImpl + ReflectImpl + InspectorEguiImpl {}
// ===== InputsContainer ===== // ===== InputsContainer =====
// SAFATY: inspector-egui includes reflect // SAFETY: inspector-egui includes reflect
#[cfg(all( #[cfg(all(
not(feature = "serialize"), not(feature = "serialize"),
not(feature = "reflect"), not(feature = "reflect"),
+5 -1
View File
@@ -496,7 +496,11 @@ common_traits_conditions! {
#[derive(Resource, Clone)] #[derive(Resource, Clone)]
#[cfg_attr(feature = "reflect", reflect(Resource))] #[cfg_attr(feature = "reflect", reflect(Resource))]
// TODO: Add delay for input // TODO: Add delay for input
pub struct Controls<A: Action, Gs: GameState>(#[cfg_attr(feature = "serialize", serde(bound(deserialize = "")))] HashMap<A, BindingConfig<Gs>>); // TODO: change HashMap to Vec for faster iteration pub struct Controls<A: Action, Gs: GameState>(
#[cfg_attr(feature = "serialize", serde(bound(deserialize = "")))]
// TODO: change HashMap to Vec for faster iteration
HashMap<A, BindingConfig<Gs>>
);
} }
impl<A: Action, Gs: GameState> Default for Controls<A, Gs> { impl<A: Action, Gs: GameState> Default for Controls<A, Gs> {