From 3dd8b42f7287340913055db34db5606c1720b9d5 Mon Sep 17 00:00:00 2001 From: Rob Parrett Date: Fri, 6 Jan 2023 00:43:30 +0000 Subject: [PATCH] Fix various typos (#7096) I stumbled across a typo in some docs. Fixed some more while I was in there. --- crates/bevy_app/src/plugin.rs | 2 +- crates/bevy_asset/src/asset_server.rs | 2 +- crates/bevy_diagnostic/src/diagnostic.rs | 2 +- crates/bevy_ecs/src/archetype.rs | 4 ++-- crates/bevy_ecs/src/change_detection.rs | 2 +- crates/bevy_ecs/src/entity/mod.rs | 2 +- crates/bevy_ecs/src/query/fetch.rs | 4 ++-- crates/bevy_ecs/src/query/mod.rs | 2 +- crates/bevy_ecs/src/schedule/mod.rs | 2 +- crates/bevy_ecs/src/storage/table.rs | 4 ++-- crates/bevy_ecs/src/system/system_param.rs | 2 +- crates/bevy_ecs/src/world/entity_ref.rs | 2 +- crates/bevy_hierarchy/src/hierarchy.rs | 2 +- crates/bevy_input/src/gamepad.rs | 8 ++++---- crates/bevy_pbr/src/lib.rs | 2 +- crates/bevy_pbr/src/light.rs | 6 +++--- crates/bevy_pbr/src/render/clustered_forward.wgsl | 2 +- crates/bevy_render/src/camera/projection.rs | 2 +- crates/bevy_render/src/render_resource/pipeline_cache.rs | 2 +- crates/bevy_scene/src/dynamic_scene_builder.rs | 2 +- crates/bevy_scene/src/scene_spawner.rs | 2 +- crates/bevy_sprite/src/render/mod.rs | 2 +- crates/bevy_tasks/src/task_pool.rs | 4 ++-- crates/bevy_time/src/stopwatch.rs | 2 +- crates/bevy_ui/src/ui_node.rs | 4 ++-- crates/bevy_utils/src/lib.rs | 2 +- crates/bevy_window/src/window.rs | 2 +- examples/shader/shader_material_glsl.rs | 2 +- tools/spancmp/src/main.rs | 2 +- 29 files changed, 39 insertions(+), 39 deletions(-) diff --git a/crates/bevy_app/src/plugin.rs b/crates/bevy_app/src/plugin.rs index 7e6e0c575a..7a88233947 100644 --- a/crates/bevy_app/src/plugin.rs +++ b/crates/bevy_app/src/plugin.rs @@ -10,7 +10,7 @@ use std::any::Any; /// can only be added once to an [`App`]. /// /// If the plugin may need to be added twice or more, the function [`is_unique()`](Self::is_unique) -/// should be overriden to return `false`. Plugins are considered duplicate if they have the same +/// should be overridden to return `false`. Plugins are considered duplicate if they have the same /// [`name()`](Self::name). The default `name()` implementation returns the type name, which means /// generic plugins with different type parameters will not be considered duplicates. pub trait Plugin: Downcast + Any + Send + Sync { diff --git a/crates/bevy_asset/src/asset_server.rs b/crates/bevy_asset/src/asset_server.rs index 97c3ede26e..abb13ccad2 100644 --- a/crates/bevy_asset/src/asset_server.rs +++ b/crates/bevy_asset/src/asset_server.rs @@ -387,7 +387,7 @@ impl AssetServer { return Err(err); } - // if version has changed since we loaded and grabbed a lock, return. theres is a newer + // if version has changed since we loaded and grabbed a lock, return. there is a newer // version being loaded let mut asset_sources = self.server.asset_sources.write(); let source_info = asset_sources diff --git a/crates/bevy_diagnostic/src/diagnostic.rs b/crates/bevy_diagnostic/src/diagnostic.rs index 7d947359db..aa2c868258 100644 --- a/crates/bevy_diagnostic/src/diagnostic.rs +++ b/crates/bevy_diagnostic/src/diagnostic.rs @@ -111,7 +111,7 @@ impl Diagnostic { /// The smoothing factor used for the exponential smoothing used for /// [`smoothed`](Self::smoothed). /// - /// If measurements come in less fequently than `smoothing_factor` seconds + /// If measurements come in less frequently than `smoothing_factor` seconds /// apart, no smoothing will be applied. As measurements come in more /// frequently, the smoothing takes a greater effect such that it takes /// approximately `smoothing_factor` seconds for 83% of an instantaneous diff --git a/crates/bevy_ecs/src/archetype.rs b/crates/bevy_ecs/src/archetype.rs index ffd9fdc518..e282901f96 100644 --- a/crates/bevy_ecs/src/archetype.rs +++ b/crates/bevy_ecs/src/archetype.rs @@ -625,7 +625,7 @@ impl Archetypes { self.archetypes.len() } - /// Fetches an immutable reference to the archetype without any compoennts. + /// Fetches an immutable reference to the archetype without any components. /// /// Shorthand for `archetypes.get(ArchetypeId::EMPTY).unwrap()` #[inline] @@ -634,7 +634,7 @@ impl Archetypes { unsafe { self.archetypes.get_unchecked(ArchetypeId::EMPTY.index()) } } - /// Fetches an mutable reference to the archetype without any compoennts. + /// Fetches an mutable reference to the archetype without any components. #[inline] pub(crate) fn empty_mut(&mut self) -> &mut Archetype { // SAFETY: empty archetype always exists diff --git a/crates/bevy_ecs/src/change_detection.rs b/crates/bevy_ecs/src/change_detection.rs index d029d9dad9..10bd2b5da3 100644 --- a/crates/bevy_ecs/src/change_detection.rs +++ b/crates/bevy_ecs/src/change_detection.rs @@ -33,7 +33,7 @@ pub const MAX_CHANGE_AGE: u32 = u32::MAX - (2 * CHECK_TICK_THRESHOLD - 1); /// /// To ensure that changes are only triggered when the value actually differs, /// check if the value would change before assignment, such as by checking that `new != old`. -/// You must be *sure* that you are not mutably derefencing in this process. +/// You must be *sure* that you are not mutably dereferencing in this process. /// /// [`set_if_neq`](DetectChanges::set_if_neq) is a helper /// method for this common functionality. diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs index c7f74c5f8d..5107923e4a 100644 --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -586,7 +586,7 @@ impl Entities { /// - `location` must be valid for the entity at `index` or immediately made valid afterwards /// before handing control to unknown code. pub(crate) unsafe fn set(&mut self, index: u32, location: EntityLocation) { - // SAFETY: Caller guarentees that `index` a valid entity index + // SAFETY: Caller guarantees that `index` a valid entity index self.meta.get_unchecked_mut(index as usize).location = location; } diff --git a/crates/bevy_ecs/src/query/fetch.rs b/crates/bevy_ecs/src/query/fetch.rs index 4a3f49f302..86eecfa6ec 100644 --- a/crates/bevy_ecs/src/query/fetch.rs +++ b/crates/bevy_ecs/src/query/fetch.rs @@ -415,7 +415,7 @@ pub unsafe trait WorldQuery { // This does not have a default body of `{}` because 99% of cases need to add accesses // and forgetting to do so would be unsound. fn update_component_access(state: &Self::State, access: &mut FilteredAccess); - // This does not have a default body of `{}` becaues 99% of cases need to add accesses + // This does not have a default body of `{}` because 99% of cases need to add accesses // and forgetting to do so would be unsound. fn update_archetype_component_access( state: &Self::State, @@ -886,7 +886,7 @@ unsafe impl WorldQuery for Option { fn update_component_access(state: &T::State, access: &mut FilteredAccess) { // We don't want to add the `with`/`without` of `T` as `Option` will match things regardless of // `T`'s filters. for example `Query<(Option<&U>, &mut V)>` will match every entity with a `V` component - // regardless of whether it has a `U` component. If we dont do this the query will not conflict with + // regardless of whether it has a `U` component. If we don't do this the query will not conflict with // `Query<&mut V, Without>` which would be unsound. let mut intermediate = access.clone(); T::update_component_access(state, &mut intermediate); diff --git a/crates/bevy_ecs/src/query/mod.rs b/crates/bevy_ecs/src/query/mod.rs index 220754b5e0..de3ddd973f 100644 --- a/crates/bevy_ecs/src/query/mod.rs +++ b/crates/bevy_ecs/src/query/mod.rs @@ -25,7 +25,7 @@ pub(crate) trait DebugCheckedUnwrap { unsafe fn debug_checked_unwrap(self) -> Self::Item; } -// Thes two impls are explicitly split to ensure that the unreachable! macro +// These two impls are explicitly split to ensure that the unreachable! macro // does not cause inlining to fail when compiling in release mode. #[cfg(debug_assertions)] impl DebugCheckedUnwrap for Option { diff --git a/crates/bevy_ecs/src/schedule/mod.rs b/crates/bevy_ecs/src/schedule/mod.rs index 222339606f..f7c8f78f45 100644 --- a/crates/bevy_ecs/src/schedule/mod.rs +++ b/crates/bevy_ecs/src/schedule/mod.rs @@ -220,7 +220,7 @@ impl Schedule { stage_label: impl StageLabel, system: impl IntoSystemDescriptor, ) -> &mut Self { - // Use a function instead of a closure to ensure that it is codegend inside bevy_ecs instead + // Use a function instead of a closure to ensure that it is codegened inside bevy_ecs instead // of the game. Closures inherit generic parameters from their enclosing function. #[cold] fn stage_not_found(stage_label: &dyn Debug) -> ! { diff --git a/crates/bevy_ecs/src/storage/table.rs b/crates/bevy_ecs/src/storage/table.rs index e5dc58dc26..5172ec4152 100644 --- a/crates/bevy_ecs/src/storage/table.rs +++ b/crates/bevy_ecs/src/storage/table.rs @@ -49,14 +49,14 @@ impl TableId { /// A opaque newtype for rows in [`Table`]s. Specifies a single row in a specific table. /// -/// Values of this type are retreivable from [`Archetype::entity_table_row`] and can be +/// Values of this type are retrievable from [`Archetype::entity_table_row`] and can be /// used alongside [`Archetype::table_id`] to fetch the exact table and row where an /// [`Entity`]'s /// /// Values of this type are only valid so long as entities have not moved around. /// Adding and removing components from an entity, or despawning it will invalidate /// potentially any table row in the table the entity was previously stored in. Users -/// should *always* fetch the approripate row from the entity's [`Archetype`] before +/// should *always* fetch the appropriate row from the entity's [`Archetype`] before /// fetching the entity's components. /// /// [`Archetype`]: crate::archetype::Archetype diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs index 7b09919698..d845f48be7 100644 --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -279,7 +279,7 @@ fn assert_component_access_compatibility( /// # bad_system_system.run((), &mut world); /// ``` /// -/// Conflicing `SystemParam`s like these can be placed in a `ParamSet`, +/// Conflicting `SystemParam`s like these can be placed in a `ParamSet`, /// which leverages the borrow checker to ensure that only one of the contained parameters are accessed at a given time. /// /// ``` diff --git a/crates/bevy_ecs/src/world/entity_ref.rs b/crates/bevy_ecs/src/world/entity_ref.rs index 251945d711..f88e599a94 100644 --- a/crates/bevy_ecs/src/world/entity_ref.rs +++ b/crates/bevy_ecs/src/world/entity_ref.rs @@ -159,7 +159,7 @@ impl<'w> EntityRef<'w> { .map(|(value, ticks)| Mut { // SAFETY: // - returned component is of type T - // - Caller guarentees that this reference will not alias. + // - Caller guarantees that this reference will not alias. value: value.assert_unique().deref_mut::(), ticks: Ticks::from_tick_cells(ticks, last_change_tick, change_tick), }) diff --git a/crates/bevy_hierarchy/src/hierarchy.rs b/crates/bevy_hierarchy/src/hierarchy.rs index df81324387..db1a67b5e8 100644 --- a/crates/bevy_hierarchy/src/hierarchy.rs +++ b/crates/bevy_hierarchy/src/hierarchy.rs @@ -172,7 +172,7 @@ mod tests { // Add a child to the grandparent (the "parent"), which will get deleted parent .spawn((N("Parent, to be deleted".to_owned()), Idx(3))) - // All descendents of the "parent" should also be deleted. + // All descendants of the "parent" should also be deleted. .with_children(|parent| { parent .spawn((N("First Child, to be deleted".to_owned()), Idx(4))) diff --git a/crates/bevy_input/src/gamepad.rs b/crates/bevy_input/src/gamepad.rs index c4f1ea22da..2cd56d9430 100644 --- a/crates/bevy_input/src/gamepad.rs +++ b/crates/bevy_input/src/gamepad.rs @@ -864,7 +864,7 @@ impl AxisSettings { /// /// If the value passed is less than the dead zone upper bound, /// returns `AxisSettingsError::DeadZoneUpperBoundGreaterThanLiveZoneUpperBound`. - /// If the value passsed is not in range [0.0..=1.0], returns `AxisSettingsError::LiveZoneUpperBoundOutOfRange`. + /// If the value passed is not in range [0.0..=1.0], returns `AxisSettingsError::LiveZoneUpperBoundOutOfRange`. pub fn try_set_livezone_upperbound(&mut self, value: f32) -> Result<(), AxisSettingsError> { if !(0.0..=1.0).contains(&value) { Err(AxisSettingsError::LiveZoneUpperBoundOutOfRange(value)) @@ -901,7 +901,7 @@ impl AxisSettings { /// /// If the value passed is greater than the live zone upper bound, /// returns `AxisSettingsError::DeadZoneUpperBoundGreaterThanLiveZoneUpperBound`. - /// If the value passsed is not in range [0.0..=1.0], returns `AxisSettingsError::DeadZoneUpperBoundOutOfRange`. + /// If the value passed is not in range [0.0..=1.0], returns `AxisSettingsError::DeadZoneUpperBoundOutOfRange`. pub fn try_set_deadzone_upperbound(&mut self, value: f32) -> Result<(), AxisSettingsError> { if !(0.0..=1.0).contains(&value) { Err(AxisSettingsError::DeadZoneUpperBoundOutOfRange(value)) @@ -939,7 +939,7 @@ impl AxisSettings { /// /// If the value passed is less than the dead zone lower bound, /// returns `AxisSettingsError::LiveZoneLowerBoundGreaterThanDeadZoneLowerBound`. - /// If the value passsed is not in range [-1.0..=0.0], returns `AxisSettingsError::LiveZoneLowerBoundOutOfRange`. + /// If the value passed is not in range [-1.0..=0.0], returns `AxisSettingsError::LiveZoneLowerBoundOutOfRange`. pub fn try_set_livezone_lowerbound(&mut self, value: f32) -> Result<(), AxisSettingsError> { if !(-1.0..=0.0).contains(&value) { Err(AxisSettingsError::LiveZoneLowerBoundOutOfRange(value)) @@ -977,7 +977,7 @@ impl AxisSettings { /// /// If the value passed is less than the live zone lower bound, /// returns `AxisSettingsError::LiveZoneLowerBoundGreaterThanDeadZoneLowerBound`. - /// If the value passsed is not in range [-1.0..=0.0], returns `AxisSettingsError::DeadZoneLowerBoundOutOfRange`. + /// If the value passed is not in range [-1.0..=0.0], returns `AxisSettingsError::DeadZoneLowerBoundOutOfRange`. pub fn try_set_deadzone_lowerbound(&mut self, value: f32) -> Result<(), AxisSettingsError> { if !(-1.0..=0.0).contains(&value) { Err(AxisSettingsError::DeadZoneLowerBoundOutOfRange(value)) diff --git a/crates/bevy_pbr/src/lib.rs b/crates/bevy_pbr/src/lib.rs index cd7c04cbfb..366456b51d 100644 --- a/crates/bevy_pbr/src/lib.rs +++ b/crates/bevy_pbr/src/lib.rs @@ -166,7 +166,7 @@ impl Plugin for PbrPlugin { .after(VisibilitySystems::CheckVisibility) .after(TransformSystem::TransformPropagate) // We assume that no entity will be both a directional light and a spot light, - // so these systems will run indepdently of one another. + // so these systems will run independently of one another. // FIXME: Add an archetype invariant for this https://github.com/bevyengine/bevy/issues/1481. .ambiguous_with(update_spot_light_frusta), ) diff --git a/crates/bevy_pbr/src/light.rs b/crates/bevy_pbr/src/light.rs index 69188850f5..abad3c9b39 100644 --- a/crates/bevy_pbr/src/light.rs +++ b/crates/bevy_pbr/src/light.rs @@ -303,7 +303,7 @@ pub enum SimulationLightSystems { // Some inspiration was taken from “Practical Clustered Shading” which is part 2 of: // https://efficientshading.com/2015/01/01/real-time-many-light-management-and-shadows-with-clustered-shading/ // (Also note that Part 3 of the above shows how we could support the shadow mapping for many lights.) -// The z-slicing method mentioned in the aortiz article is originally from Tiago Sousa’s Siggraph 2016 talk about Doom 2016: +// The z-slicing method mentioned in the aortiz article is originally from Tiago Sousa's Siggraph 2016 talk about Doom 2016: // http://advances.realtimerendering.com/s2016/Siggraph2016_idTech6.pdf /// Configure the far z-plane mode used for the furthest depth slice for clustered forward @@ -550,7 +550,7 @@ fn view_z_to_z_slice( // NOTE: had to use -view_z to make it positive else log(negative) is nan ((-view_z).ln() * cluster_factors.x - cluster_factors.y + 1.0) as u32 }; - // NOTE: We use min as we may limit the far z plane used for clustering to be closeer than + // NOTE: We use min as we may limit the far z plane used for clustering to be closer than // the furthest thing being drawn. This means that we need to limit to the maximum cluster. z_slice.min(z_slices - 1) } @@ -1437,7 +1437,7 @@ fn project_to_plane_z(z_light: Sphere, z_plane: Plane) -> Option { Some(Sphere { center: Vec3A::from(z_light.center.xy().extend(z)), // hypotenuse length = radius - // pythagorus = (distance to plane)^2 + b^2 = radius^2 + // pythagoras = (distance to plane)^2 + b^2 = radius^2 radius: (z_light.radius * z_light.radius - distance_to_plane * distance_to_plane).sqrt(), }) } diff --git a/crates/bevy_pbr/src/render/clustered_forward.wgsl b/crates/bevy_pbr/src/render/clustered_forward.wgsl index c291aee2ff..5939b7d31b 100644 --- a/crates/bevy_pbr/src/render/clustered_forward.wgsl +++ b/crates/bevy_pbr/src/render/clustered_forward.wgsl @@ -10,7 +10,7 @@ fn view_z_to_z_slice(view_z: f32, is_orthographic: bool) -> u32 { // NOTE: had to use -view_z to make it positive else log(negative) is nan z_slice = u32(log(-view_z) * lights.cluster_factors.z - lights.cluster_factors.w + 1.0); } - // NOTE: We use min as we may limit the far z plane used for clustering to be closeer than + // NOTE: We use min as we may limit the far z plane used for clustering to be closer than // the furthest thing being drawn. This means that we need to limit to the maximum cluster. return min(z_slice, lights.cluster_dimensions.z - 1u); } diff --git a/crates/bevy_render/src/camera/projection.rs b/crates/bevy_render/src/camera/projection.rs index 1e30953ee1..c3d6591e17 100644 --- a/crates/bevy_render/src/camera/projection.rs +++ b/crates/bevy_render/src/camera/projection.rs @@ -19,7 +19,7 @@ impl Default for CameraProjectionPlugin { } } -/// Label for [`camera_system`], shared accross all `T`. +/// Label for [`camera_system`], shared across all `T`. /// /// [`camera_system`]: crate::camera::camera_system #[derive(SystemLabel, Clone, Eq, PartialEq, Hash, Debug)] diff --git a/crates/bevy_render/src/render_resource/pipeline_cache.rs b/crates/bevy_render/src/render_resource/pipeline_cache.rs index 0209c2e8c9..894103a30d 100644 --- a/crates/bevy_render/src/render_resource/pipeline_cache.rs +++ b/crates/bevy_render/src/render_resource/pipeline_cache.rs @@ -218,7 +218,7 @@ impl ShaderCache { let error = render_device.wgpu_device().pop_error_scope(); // `now_or_never` will return Some if the future is ready and None otherwise. - // On native platforms, wgpu will yield the error immediatly while on wasm it may take longer since the browser APIs are asynchronous. + // On native platforms, wgpu will yield the error immediately while on wasm it may take longer since the browser APIs are asynchronous. // So to keep the complexity of the ShaderCache low, we will only catch this error early on native platforms, // and on wasm the error will be handled by wgpu and crash the application. if let Some(Some(wgpu::Error::Validation { description, .. })) = diff --git a/crates/bevy_scene/src/dynamic_scene_builder.rs b/crates/bevy_scene/src/dynamic_scene_builder.rs index 5ea65a8714..98bf10e27f 100644 --- a/crates/bevy_scene/src/dynamic_scene_builder.rs +++ b/crates/bevy_scene/src/dynamic_scene_builder.rs @@ -74,7 +74,7 @@ impl<'w> DynamicSceneBuilder<'w> { self.extract_entities(std::iter::once(entity)) } - /// Despawns all enitities with no components. + /// Despawns all entities with no components. /// /// These were likely created because none of their components were present in the provided type registry upon extraction. pub fn remove_empty_entities(&mut self) -> &mut Self { diff --git a/crates/bevy_scene/src/scene_spawner.rs b/crates/bevy_scene/src/scene_spawner.rs index f8f581a609..7a0c8f851b 100644 --- a/crates/bevy_scene/src/scene_spawner.rs +++ b/crates/bevy_scene/src/scene_spawner.rs @@ -12,7 +12,7 @@ use bevy_utils::{tracing::error, HashMap}; use thiserror::Error; use uuid::Uuid; -/// Informations about a scene instance. +/// Information about a scene instance. #[derive(Debug)] pub struct InstanceInfo { /// Mapping of entities from the scene world to the instance world. diff --git a/crates/bevy_sprite/src/render/mod.rs b/crates/bevy_sprite/src/render/mod.rs index e7df0c1c32..09c386b406 100644 --- a/crates/bevy_sprite/src/render/mod.rs +++ b/crates/bevy_sprite/src/render/mod.rs @@ -549,7 +549,7 @@ pub fn queue_sprites( }; let mut current_batch_entity = Entity::PLACEHOLDER; let mut current_image_size = Vec2::ZERO; - // Add a phase item for each sprite, and detect when succesive items can be batched. + // Add a phase item for each sprite, and detect when successive items can be batched. // Spawn an entity with a `SpriteBatch` component for each possible batch. // Compatible items share the same entity. // Batches are merged later (in `batch_phase_system()`), so that they can be interrupted diff --git a/crates/bevy_tasks/src/task_pool.rs b/crates/bevy_tasks/src/task_pool.rs index 83bc92843f..958e35aafd 100644 --- a/crates/bevy_tasks/src/task_pool.rs +++ b/crates/bevy_tasks/src/task_pool.rs @@ -414,7 +414,7 @@ impl<'scope, 'env, T: Send + 'scope> Scope<'scope, 'env, T> { pub fn spawn + 'scope + Send>(&self, f: Fut) { let task = self.executor.spawn(f).fallible(); // ConcurrentQueue only errors when closed or full, but we never - // close and use an unbouded queue, so it is safe to unwrap + // close and use an unbounded queue, so it is safe to unwrap self.spawned.push(task).unwrap(); } @@ -427,7 +427,7 @@ impl<'scope, 'env, T: Send + 'scope> Scope<'scope, 'env, T> { pub fn spawn_on_scope + 'scope + Send>(&self, f: Fut) { let task = self.task_scope_executor.spawn(f).fallible(); // ConcurrentQueue only errors when closed or full, but we never - // close and use an unbouded queue, so it is safe to unwrap + // close and use an unbounded queue, so it is safe to unwrap self.spawned.push(task).unwrap(); } } diff --git a/crates/bevy_time/src/stopwatch.rs b/crates/bevy_time/src/stopwatch.rs index dcc0cfb9f2..636ea19ebe 100644 --- a/crates/bevy_time/src/stopwatch.rs +++ b/crates/bevy_time/src/stopwatch.rs @@ -187,7 +187,7 @@ impl Stopwatch { self.paused } - /// Resets the stopwatch. The reset doesn’t affect the paused state of the stopwatch. + /// Resets the stopwatch. The reset doesn't affect the paused state of the stopwatch. /// /// # Examples /// ``` diff --git a/crates/bevy_ui/src/ui_node.rs b/crates/bevy_ui/src/ui_node.rs index a19f7802df..31f232c4d1 100644 --- a/crates/bevy_ui/src/ui_node.rs +++ b/crates/bevy_ui/src/ui_node.rs @@ -157,7 +157,7 @@ impl Val { /// Returns a [`ValArithmeticError::NonEvaluateable`] if the [`Val`] is impossible to evaluate into [`Val::Px`]. /// Otherwise it returns an [`f32`] containing the evaluated value in pixels. /// - /// **Note:** If a [`Val::Px`] is evaluated, it's innver value returned unchanged. + /// **Note:** If a [`Val::Px`] is evaluated, it's inner value returned unchanged. pub fn evaluate(&self, size: f32) -> Result { match self { Val::Percent(value) => Ok(size * value / 100.0), @@ -554,7 +554,7 @@ impl Default for FlexWrap { pub struct CalculatedSize { /// The size of the node pub size: Size, - /// Whether to attempt to preserve the aspect ratio when determing the layout for this item + /// Whether to attempt to preserve the aspect ratio when determining the layout for this item pub preserve_aspect_ratio: bool, } diff --git a/crates/bevy_utils/src/lib.rs b/crates/bevy_utils/src/lib.rs index 840c1fdf92..2a522c0879 100644 --- a/crates/bevy_utils/src/lib.rs +++ b/crates/bevy_utils/src/lib.rs @@ -38,7 +38,7 @@ use std::{ pin::Pin, }; -/// An owned and dynamically typed Future used when you can’t statically type your result or need to add some indirection. +/// An owned and dynamically typed Future used when you can't statically type your result or need to add some indirection. #[cfg(not(target_arch = "wasm32"))] pub type BoxedFuture<'a, T> = Pin + Send + 'a>>; diff --git a/crates/bevy_window/src/window.rs b/crates/bevy_window/src/window.rs index 17b54b508a..93adedbe86 100644 --- a/crates/bevy_window/src/window.rs +++ b/crates/bevy_window/src/window.rs @@ -78,7 +78,7 @@ pub enum PresentMode { )] #[reflect(Debug, PartialEq, Hash)] pub enum CompositeAlphaMode { - /// Chooses either `Opaque` or `Inherit` automatically,depending on the + /// Chooses either `Opaque` or `Inherit` automatically, depending on the /// `alpha_mode` that the current surface can support. Auto = 0, /// The alpha channel, if it exists, of the textures is ignored in the diff --git a/examples/shader/shader_material_glsl.rs b/examples/shader/shader_material_glsl.rs index fe7e47c86f..01409b2634 100644 --- a/examples/shader/shader_material_glsl.rs +++ b/examples/shader/shader_material_glsl.rs @@ -60,7 +60,7 @@ pub struct CustomMaterial { /// The Material trait is very configurable, but comes with sensible defaults for all methods. /// You only need to implement functions for features that need non-default behavior. See the Material api docs for details! -/// When using the GLSL shading language for your shader, the specialize method must be overriden. +/// When using the GLSL shading language for your shader, the specialize method must be overridden. impl Material for CustomMaterial { fn vertex_shader() -> ShaderRef { "shaders/custom_material.vert".into() diff --git a/tools/spancmp/src/main.rs b/tools/spancmp/src/main.rs index 010e1620f4..d5a18e9d5e 100644 --- a/tools/spancmp/src/main.rs +++ b/tools/spancmp/src/main.rs @@ -16,7 +16,7 @@ mod pretty; #[derive(Parser, Debug)] struct Args { #[arg(short, long, default_value_t = 0.0)] - /// Filter spans that have an average shorther than the threshold + /// Filter spans that have an average shorter than the threshold threshold: f32, #[arg(short, long)]