style: format macro + fix comment typos
This commit is contained in:
@@ -51,7 +51,7 @@ pub trait ReflectImpl: Reflect + TypePath + FromReflect {}
|
||||
pub trait InspectorEguiImpl: InspectorOptionsType {}
|
||||
|
||||
// ===== Action =====
|
||||
// SAFATY: inspector-egui includes reflect
|
||||
// SAFETY: inspector-egui includes reflect
|
||||
#[cfg(all(
|
||||
not(feature = "serialize"),
|
||||
not(feature = "reflect"),
|
||||
@@ -87,7 +87,7 @@ pub trait Action: ActionInner + ReflectImpl + InspectorEguiImpl {}
|
||||
pub trait Action: ActionInner + SerializeImpl + ReflectImpl + InspectorEguiImpl {}
|
||||
|
||||
// ===== GameState =====
|
||||
// SAFATY: inspector-egui includes reflect
|
||||
// SAFETY: inspector-egui includes reflect
|
||||
#[cfg(all(
|
||||
not(feature = "serialize"),
|
||||
not(feature = "reflect"),
|
||||
@@ -123,7 +123,7 @@ pub trait GameState: GameStateInner + ReflectImpl + InspectorEguiImpl {}
|
||||
pub trait GameState: GameStateInner + SerializeImpl + ReflectImpl + InspectorEguiImpl {}
|
||||
|
||||
// ===== InputsContainer =====
|
||||
// SAFATY: inspector-egui includes reflect
|
||||
// SAFETY: inspector-egui includes reflect
|
||||
#[cfg(all(
|
||||
not(feature = "serialize"),
|
||||
not(feature = "reflect"),
|
||||
|
||||
@@ -496,7 +496,11 @@ common_traits_conditions! {
|
||||
#[derive(Resource, Clone)]
|
||||
#[cfg_attr(feature = "reflect", reflect(Resource))]
|
||||
// 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> {
|
||||
|
||||
Reference in New Issue
Block a user