From c8521a7c977f97b7fc87597664ef8b1c2413aaca Mon Sep 17 00:00:00 2001 From: nativerv Date: Fri, 16 Feb 2024 00:23:25 +0300 Subject: [PATCH] style: format macro + fix comment typos --- crate/bevy_controls/src/contract.rs | 6 +++--- crate/bevy_controls/src/resource.rs | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/crate/bevy_controls/src/contract.rs b/crate/bevy_controls/src/contract.rs index 3f3df21..0c925b6 100644 --- a/crate/bevy_controls/src/contract.rs +++ b/crate/bevy_controls/src/contract.rs @@ -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"), diff --git a/crate/bevy_controls/src/resource.rs b/crate/bevy_controls/src/resource.rs index dc437b0..1215dad 100644 --- a/crate/bevy_controls/src/resource.rs +++ b/crate/bevy_controls/src/resource.rs @@ -496,7 +496,11 @@ common_traits_conditions! { #[derive(Resource, Clone)] #[cfg_attr(feature = "reflect", reflect(Resource))] // TODO: Add delay for input - pub struct Controls(#[cfg_attr(feature = "serialize", serde(bound(deserialize = "")))] HashMap>); // TODO: change HashMap to Vec for faster iteration + pub struct Controls( + #[cfg_attr(feature = "serialize", serde(bound(deserialize = "")))] + // TODO: change HashMap to Vec for faster iteration + HashMap> + ); } impl Default for Controls {