From 483f2464a82a437248c92eb3169bfa5c6485cd8e Mon Sep 17 00:00:00 2001 From: SADIK KUZU Date: Fri, 29 Sep 2023 15:26:41 +0300 Subject: [PATCH] Fix typos (#9965) # Objective - There were a few typos in the project. - This PR fixes these typos. ## Solution - Fixing the typos. Signed-off-by: SADIK KUZU --- crates/bevy_ecs/src/schedule/schedule.rs | 2 +- crates/bevy_ecs/src/system/system_registry.rs | 2 +- crates/bevy_ecs/src/world/entity_ref.rs | 4 ++-- crates/bevy_hierarchy/src/components/parent.rs | 2 +- crates/bevy_ui/src/ui_node.rs | 2 +- examples/input/gamepad_input_events.rs | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs index 48abc58990f18..e6b5d502f8e4f 100644 --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -251,7 +251,7 @@ impl Schedule { world.check_change_ticks(); self.initialize(world) - .unwrap_or_else(|e| panic!("Error when intializing schedule {:?}: {e}", self.name)); + .unwrap_or_else(|e| panic!("Error when initializing schedule {:?}: {e}", self.name)); self.executor.run(&mut self.executable, world); } diff --git a/crates/bevy_ecs/src/system/system_registry.rs b/crates/bevy_ecs/src/system/system_registry.rs index f0522606d978f..3d6320d301593 100644 --- a/crates/bevy_ecs/src/system/system_registry.rs +++ b/crates/bevy_ecs/src/system/system_registry.rs @@ -43,7 +43,7 @@ pub struct SystemId(Entity); impl World { /// Registers a system and returns a [`SystemId`] so it can later be called by [`World::run_system`]. /// - /// It's possible to register the same systems more than once, they'll be stored seperately. + /// It's possible to register the same systems more than once, they'll be stored separately. /// /// This is different from adding systems to a [`Schedule`](crate::schedule::Schedule), /// because the [`SystemId`] that is returned can be used anywhere in the [`World`] to run the associated system. diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs index 3a497db57aa02..274daeed05547 100644 --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -174,7 +174,7 @@ impl<'a> From<&'a EntityWorldMut<'_>> for EntityRef<'a> { impl<'w> From> for EntityRef<'w> { fn from(value: EntityMut<'w>) -> Self { // SAFETY: - // - `EntityMut` gurantees exclusive access to all of the entity's components. + // - `EntityMut` guarantees exclusive access to all of the entity's components. unsafe { EntityRef::new(value.0) } } } @@ -182,7 +182,7 @@ impl<'w> From> for EntityRef<'w> { impl<'a> From<&'a EntityMut<'_>> for EntityRef<'a> { fn from(value: &'a EntityMut<'_>) -> Self { // SAFETY: - // - `EntityMut` gurantees exclusive access to all of the entity's components. + // - `EntityMut` guarantees exclusive access to all of the entity's components. // - `&value` ensures there are no mutable accesses. unsafe { EntityRef::new(value.0) } } diff --git a/crates/bevy_hierarchy/src/components/parent.rs b/crates/bevy_hierarchy/src/components/parent.rs index 68ba8c7c91ed0..2a013ad8a142d 100644 --- a/crates/bevy_hierarchy/src/components/parent.rs +++ b/crates/bevy_hierarchy/src/components/parent.rs @@ -26,7 +26,7 @@ impl Parent { /// Gets the parent [`Entity`] as a slice of length 1. /// - /// Useful for making APIs that require a type or homogenous storage + /// Useful for making APIs that require a type or homogeneous storage /// for both [`Children`] & [`Parent`] that is agnostic to edge direction. /// /// [`Children`]: super::children::Children diff --git a/crates/bevy_ui/src/ui_node.rs b/crates/bevy_ui/src/ui_node.rs index d378806bfff3c..277ce3f760759 100644 --- a/crates/bevy_ui/src/ui_node.rs +++ b/crates/bevy_ui/src/ui_node.rs @@ -1392,7 +1392,7 @@ fn try_into_grid_span(span: u16) -> Result, GridPlacementErro )) } -/// Errors that occur when setting contraints for a `GridPlacement` +/// Errors that occur when setting constraints for a `GridPlacement` #[derive(Debug, Eq, PartialEq, Clone, Copy, Error)] pub enum GridPlacementError { #[error("Zero is not a valid grid position")] diff --git a/examples/input/gamepad_input_events.rs b/examples/input/gamepad_input_events.rs index 73bd6ffef95c8..db1e8fc04d773 100644 --- a/examples/input/gamepad_input_events.rs +++ b/examples/input/gamepad_input_events.rs @@ -24,7 +24,7 @@ fn gamepad_events( // Handles the boolean measure of whether a button is considered pressed or unpressed, as // defined by the thresholds in `GamepadSettings::button_settings` and measured by // `Input`. When the threshold is crossed and the button state changes, - // this event is emmitted. + // this event is emitted. mut button_input_events: EventReader, ) { for connection_event in connection_events.read() {