From 9d67edc3a636351d7c6190fb9fec4bfa7ef4c2be Mon Sep 17 00:00:00 2001 From: Ame <104745335+ameknite@users.noreply.github.com> Date: Thu, 22 Feb 2024 12:55:22 -0600 Subject: [PATCH] fix some typos (#12038) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Objective Split - containing only the fixed typos - https://github.com/bevyengine/bevy/pull/12036#pullrequestreview-1894738751 # Migration Guide In `crates/bevy_mikktspace/src/generated.rs` ```rs // before pub struct SGroup { pub iVertexRepresentitive: i32, .. } // after pub struct SGroup { pub iVertexRepresentative: i32, .. } ``` In `crates/bevy_core_pipeline/src/core_2d/mod.rs` ```rs // before Node2D::ConstrastAdaptiveSharpening // after Node2D::ContrastAdaptiveSharpening ``` --------- Co-authored-by: Alice Cecile Co-authored-by: James Liu Co-authored-by: François --- crates/bevy_app/src/app.rs | 4 ++-- crates/bevy_asset/src/path.rs | 10 +++++----- crates/bevy_asset/src/transformer.rs | 4 ++-- .../src/contrast_adaptive_sharpening/mod.rs | 6 +++--- crates/bevy_core_pipeline/src/core_2d/mod.rs | 2 +- crates/bevy_ecs/src/identifier/error.rs | 2 +- crates/bevy_ecs/src/identifier/masks.rs | 2 +- crates/bevy_ecs/src/query/builder.rs | 4 ++-- crates/bevy_ecs/src/query/iter.rs | 2 +- crates/bevy_ecs/src/reflect/from_world.rs | 2 +- crates/bevy_ecs/src/schedule/config.rs | 2 +- crates/bevy_ecs/src/schedule/schedule.rs | 2 +- crates/bevy_ecs/src/system/query.rs | 2 +- crates/bevy_ecs/src/system/system_param.rs | 4 ++-- crates/bevy_gizmos/src/primitives/dim3.rs | 10 +++++----- crates/bevy_input/src/keyboard.rs | 6 +++--- crates/bevy_macro_utils/src/bevy_manifest.rs | 2 +- crates/bevy_mikktspace/src/generated.rs | 18 +++++++++--------- crates/bevy_pbr/src/material.rs | 4 ++-- crates/bevy_pbr/src/pbr_material.rs | 2 +- .../bevy_reflect_derive/src/utility.rs | 2 +- crates/bevy_reflect/src/lib.rs | 2 +- crates/bevy_reflect/src/path/error.rs | 2 +- crates/bevy_reflect/src/path/mod.rs | 4 ++-- crates/bevy_sprite/src/lib.rs | 4 ++-- crates/bevy_ui/src/ui_node.rs | 8 ++++---- crates/bevy_utils/src/parallel_queue.rs | 2 +- examples/app/logs.rs | 2 +- examples/app/return_after_run.rs | 2 +- examples/asset/asset_decompression.rs | 2 +- examples/asset/processing/asset_processing.rs | 2 +- examples/ecs/dynamic.rs | 4 ++-- examples/ecs/send_and_receive_events.rs | 2 +- examples/math/render_primitives.rs | 16 ++++++++-------- 34 files changed, 72 insertions(+), 72 deletions(-) diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs index 4864832922c0f..54a324a85f0b2 100644 --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -1005,8 +1005,8 @@ impl App { /// (conflicting access but indeterminate order) with systems in `set`. /// /// When possible, do this directly in the `.add_systems(Update, a.ambiguous_with(b))` call. - /// However, sometimes two independant plugins `A` and `B` are reported as ambiguous, which you - /// can only supress as the consumer of both. + /// However, sometimes two independent plugins `A` and `B` are reported as ambiguous, which you + /// can only suppress as the consumer of both. #[track_caller] pub fn ignore_ambiguity( &mut self, diff --git a/crates/bevy_asset/src/path.rs b/crates/bevy_asset/src/path.rs index 6ec1e8eaa6b78..d135fa02d3173 100644 --- a/crates/bevy_asset/src/path.rs +++ b/crates/bevy_asset/src/path.rs @@ -87,7 +87,7 @@ pub enum ParseAssetPathError { /// Error that occurs when the [`AssetPath::label`] section of a path string contains the [`AssetPath::source`] delimiter `://`. E.g. `source://file.test#bad://label`. #[error("Asset label must not contain a `://` substring")] InvalidLabelSyntax, - /// Error that occurs when a path string has an [`AssetPath::source`] delimiter `://` with no characters preceeding it. E.g. `://file.test`. + /// Error that occurs when a path string has an [`AssetPath::source`] delimiter `://` with no characters preceding it. E.g. `://file.test`. #[error("Asset source must be at least one character. Either specify the source before the '://' or remove the `://`")] MissingSource, /// Error that occurs when a path string has an [`AssetPath::label`] delimiter `#` with no characters succeeding it. E.g. `file.test#` @@ -143,9 +143,9 @@ impl<'a> AssetPath<'a> { let mut label_range = None; // Loop through the characters of the passed in &str to accomplish the following: - // 1. Seach for the first instance of the `://` substring. If the `://` substring is found, + // 1. Search for the first instance of the `://` substring. If the `://` substring is found, // store the range of indices representing everything before the `://` substring as the `source_range`. - // 2. Seach for the last instance of the `#` character. If the `#` character is found, + // 2. Search for the last instance of the `#` character. If the `#` character is found, // store the range of indices representing everything after the `#` character as the `label_range` // 3. Set the `path_range` to be everything in between the `source_range` and `label_range`, // excluding the `://` substring and `#` character. @@ -165,7 +165,7 @@ impl<'a> AssetPath<'a> { 2 => { // If we haven't found our first `AssetPath::source` yet, check to make sure it is valid and then store it. if source_range.is_none() { - // If the `AssetPath::source` containes a `#` character, it is invalid. + // If the `AssetPath::source` contains a `#` character, it is invalid. if label_range.is_some() { return Err(ParseAssetPathError::InvalidSourceSyntax); } @@ -833,7 +833,7 @@ mod tests { #[test] fn test_resolve_implicit_relative() { - // A path with no inital directory separator should be considered relative. + // A path with no initial directory separator should be considered relative. let base = AssetPath::from("alice/bob#carol"); assert_eq!( base.resolve("joe/next").unwrap(), diff --git a/crates/bevy_asset/src/transformer.rs b/crates/bevy_asset/src/transformer.rs index 48abff99cd763..3b8ae58bc37cd 100644 --- a/crates/bevy_asset/src/transformer.rs +++ b/crates/bevy_asset/src/transformer.rs @@ -18,7 +18,7 @@ pub trait AssetTransformer: Send + Sync + 'static { /// The type of [error](`std::error::Error`) which could be encountered by this transformer. type Error: Into>; - /// Transformes the given [`TransformedAsset`] to [`AssetTransformer::AssetOutput`]. + /// Transforms the given [`TransformedAsset`] to [`AssetTransformer::AssetOutput`]. /// The [`TransformedAsset`]'s `labeled_assets` can be altered to add new Labeled Sub-Assets /// The passed in `settings` can influence how the `asset` is transformed fn transform<'a>( @@ -58,7 +58,7 @@ impl TransformedAsset { } None } - /// Creates a new [`TransformedAsset`] from `asset`, transfering the `labeled_assets` from this [`TransformedAsset`] to the new one + /// Creates a new [`TransformedAsset`] from `asset`, transferring the `labeled_assets` from this [`TransformedAsset`] to the new one pub fn replace_asset(self, asset: B) -> TransformedAsset { TransformedAsset { value: asset, diff --git a/crates/bevy_core_pipeline/src/contrast_adaptive_sharpening/mod.rs b/crates/bevy_core_pipeline/src/contrast_adaptive_sharpening/mod.rs index ff8edecbaf165..d1b5ddf37e5ca 100644 --- a/crates/bevy_core_pipeline/src/contrast_adaptive_sharpening/mod.rs +++ b/crates/bevy_core_pipeline/src/contrast_adaptive_sharpening/mod.rs @@ -142,17 +142,17 @@ impl Plugin for CASPlugin { } { render_app - .add_render_graph_node::(Core2d, Node2d::ConstrastAdaptiveSharpening) + .add_render_graph_node::(Core2d, Node2d::ContrastAdaptiveSharpening) .add_render_graph_edge( Core2d, Node2d::Tonemapping, - Node2d::ConstrastAdaptiveSharpening, + Node2d::ContrastAdaptiveSharpening, ) .add_render_graph_edges( Core2d, ( Node2d::Fxaa, - Node2d::ConstrastAdaptiveSharpening, + Node2d::ContrastAdaptiveSharpening, Node2d::EndMainPassPostProcessing, ), ); diff --git a/crates/bevy_core_pipeline/src/core_2d/mod.rs b/crates/bevy_core_pipeline/src/core_2d/mod.rs index db87ad647af7e..e2684e1553f2c 100644 --- a/crates/bevy_core_pipeline/src/core_2d/mod.rs +++ b/crates/bevy_core_pipeline/src/core_2d/mod.rs @@ -19,7 +19,7 @@ pub mod graph { Tonemapping, Fxaa, Upscaling, - ConstrastAdaptiveSharpening, + ContrastAdaptiveSharpening, EndMainPassPostProcessing, } } diff --git a/crates/bevy_ecs/src/identifier/error.rs b/crates/bevy_ecs/src/identifier/error.rs index 8974ce954b2d9..6f0ee8a972706 100644 --- a/crates/bevy_ecs/src/identifier/error.rs +++ b/crates/bevy_ecs/src/identifier/error.rs @@ -4,7 +4,7 @@ use std::fmt; /// An Error type for [`super::Identifier`], mostly for providing error -/// handling for convertions of an ID to a type abstracting over the ID bits. +/// handling for conversions of an ID to a type abstracting over the ID bits. #[derive(Debug, PartialEq, Eq, Clone, Copy)] #[non_exhaustive] pub enum IdentifierError { diff --git a/crates/bevy_ecs/src/identifier/masks.rs b/crates/bevy_ecs/src/identifier/masks.rs index 7751ce16be3f8..d5adc856ddb88 100644 --- a/crates/bevy_ecs/src/identifier/masks.rs +++ b/crates/bevy_ecs/src/identifier/masks.rs @@ -67,7 +67,7 @@ impl IdentifierMask { let overflowed = lo >> 31; // SAFETY: - // - Adding the overflow flag will offet overflows to start at 1 instead of 0 + // - Adding the overflow flag will offset overflows to start at 1 instead of 0 // - The sum of `0x7FFF_FFFF` + `u32::MAX` + 1 (overflow) == `0x7FFF_FFFF` // - If the operation doesn't overflow at 31 bits, no offsetting takes place unsafe { NonZeroU32::new_unchecked(lo.wrapping_add(overflowed) & HIGH_MASK) } diff --git a/crates/bevy_ecs/src/query/builder.rs b/crates/bevy_ecs/src/query/builder.rs index 67db644a4fcb4..160999e9e84b4 100644 --- a/crates/bevy_ecs/src/query/builder.rs +++ b/crates/bevy_ecs/src/query/builder.rs @@ -210,7 +210,7 @@ impl<'w, D: QueryData, F: QueryFilter> QueryBuilder<'w, D, F> { } /// Transmute the existing builder adding required accesses. - /// This will maintain all exisiting accesses. + /// This will maintain all existing accesses. /// /// If including a filter type see [`Self::transmute_filtered`] pub fn transmute(&mut self) -> &mut QueryBuilder<'w, NewD> { @@ -233,7 +233,7 @@ impl<'w, D: QueryData, F: QueryFilter> QueryBuilder<'w, D, F> { self.extend_access(access); // SAFETY: - // - We have included all required acceses for NewQ and NewF + // - We have included all required accesses for NewQ and NewF // - The layout of all QueryBuilder instances is the same unsafe { std::mem::transmute(self) } } diff --git a/crates/bevy_ecs/src/query/iter.rs b/crates/bevy_ecs/src/query/iter.rs index 8d47073ccf070..8c38525a94486 100644 --- a/crates/bevy_ecs/src/query/iter.rs +++ b/crates/bevy_ecs/src/query/iter.rs @@ -59,7 +59,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryIter<'w, 's, D, F> { Func: FnMut(D::Item<'w>), { // SAFETY: Caller assures that D::IS_DENSE and F::IS_DENSE are true, that table matches D and F - // and all indicies in rows are in range. + // and all indices in rows are in range. unsafe { self.fold_over_table_range((), &mut |_, item| func(item), table, rows); } diff --git a/crates/bevy_ecs/src/reflect/from_world.rs b/crates/bevy_ecs/src/reflect/from_world.rs index 8f9891406c9d5..fb9ffc8939ccd 100644 --- a/crates/bevy_ecs/src/reflect/from_world.rs +++ b/crates/bevy_ecs/src/reflect/from_world.rs @@ -1,5 +1,5 @@ //! Definitions for [`FromWorld`] reflection. -//! This allows creating instaces of types that are known only at runtime and +//! This allows creating instances of types that are known only at runtime and //! require an `&mut World` to be initialized. //! //! This module exports two types: [`ReflectFromWorldFns`] and [`ReflectFromWorld`]. diff --git a/crates/bevy_ecs/src/schedule/config.rs b/crates/bevy_ecs/src/schedule/config.rs index 26f65911bec8b..7b3419ceb7022 100644 --- a/crates/bevy_ecs/src/schedule/config.rs +++ b/crates/bevy_ecs/src/schedule/config.rs @@ -419,7 +419,7 @@ where /// /// Ordering constraints will be applied between the successive elements. /// - /// If the preceeding node on a edge has deferred parameters, a [`apply_deferred`](crate::schedule::apply_deferred) + /// If the preceding node on a edge has deferred parameters, a [`apply_deferred`](crate::schedule::apply_deferred) /// will be inserted on the edge. If this behavior is not desired consider using /// [`chain_ignore_deferred`](Self::chain_ignore_deferred) instead. fn chain(self) -> SystemConfigs { diff --git a/crates/bevy_ecs/src/schedule/schedule.rs b/crates/bevy_ecs/src/schedule/schedule.rs index 200af2f5f594f..82d26c92f133f 100644 --- a/crates/bevy_ecs/src/schedule/schedule.rs +++ b/crates/bevy_ecs/src/schedule/schedule.rs @@ -161,7 +161,7 @@ fn make_executor(kind: ExecutorKind) -> Box { /// Chain systems into dependencies #[derive(PartialEq)] pub enum Chain { - /// Run nodes in order. If there are deferred parameters in preceeding systems a + /// Run nodes in order. If there are deferred parameters in preceding systems a /// [`apply_deferred`] will be added on the edge. Yes, /// Run nodes in order. This will not add [`apply_deferred`] between nodes. diff --git a/crates/bevy_ecs/src/system/query.rs b/crates/bevy_ecs/src/system/query.rs index 232ac3cd0feb0..773a0c0e3aff4 100644 --- a/crates/bevy_ecs/src/system/query.rs +++ b/crates/bevy_ecs/src/system/query.rs @@ -1290,7 +1290,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> Query<'w, 's, D, F> { /// ## Allowed Transmutes /// /// Besides removing parameters from the query, you can also - /// make limited changes to the types of paramters. + /// make limited changes to the types of parameters. /// /// * Can always add/remove `Entity` /// * `Ref` <-> `&T` diff --git a/crates/bevy_ecs/src/system/system_param.rs b/crates/bevy_ecs/src/system/system_param.rs index a058c37428fcd..2971717147b56 100644 --- a/crates/bevy_ecs/src/system/system_param.rs +++ b/crates/bevy_ecs/src/system/system_param.rs @@ -697,8 +697,8 @@ unsafe impl SystemParam for &'_ World { /// # use bevy_ecs::system::assert_is_system; /// struct Config(u32); /// #[derive(Resource)] -/// struct Myu32Wrapper(u32); -/// fn reset_to_system(value: Config) -> impl FnMut(ResMut) { +/// struct MyU32Wrapper(u32); +/// fn reset_to_system(value: Config) -> impl FnMut(ResMut) { /// move |mut val| val.0 = value.0 /// } /// diff --git a/crates/bevy_gizmos/src/primitives/dim3.rs b/crates/bevy_gizmos/src/primitives/dim3.rs index 3fd3bfdafba90..feb4b558f6281 100644 --- a/crates/bevy_gizmos/src/primitives/dim3.rs +++ b/crates/bevy_gizmos/src/primitives/dim3.rs @@ -698,9 +698,9 @@ pub struct ConicalFrustum3dBuilder<'a, 'w, 's, T: GizmoConfigGroup> { // Center of conical frustum, half-way between the top and the bottom position: Vec3, - // Rotation of the conical frustrum + // Rotation of the conical frustum // - // default orientation is: conical frustrum base shape normals are aligned with `Vec3::Y` axis + // default orientation is: conical frustum base shape normals are aligned with `Vec3::Y` axis rotation: Quat, // Color of the conical frustum color: Color, @@ -760,7 +760,7 @@ impl Drop for ConicalFrustum3dBuilder<'_, '_, '_, T> { let half_height = *height * 0.5; let normal = *rotation * Vec3::Y; - // draw the two circles of the conical frustrum + // draw the two circles of the conical frustum [(*radius_top, half_height), (*radius_bottom, -half_height)] .into_iter() .for_each(|(radius, height)| { @@ -774,7 +774,7 @@ impl Drop for ConicalFrustum3dBuilder<'_, '_, '_, T> { ); }); - // connect the two circles of the conical frustrum + // connect the two circles of the conical frustum circle_coordinates(*radius_top, *segments) .map(move |p| Vec3::new(p.x, half_height, p.y)) .zip( @@ -802,7 +802,7 @@ pub struct Torus3dBuilder<'a, 'w, 's, T: GizmoConfigGroup> { // Center of the torus position: Vec3, - // Rotation of the conical frustrum + // Rotation of the conical frustum // // default orientation is: major circle normal is aligned with `Vec3::Y` axis rotation: Quat, diff --git a/crates/bevy_input/src/keyboard.rs b/crates/bevy_input/src/keyboard.rs index 3465403871f45..a7999b47c4b1e 100644 --- a/crates/bevy_input/src/keyboard.rs +++ b/crates/bevy_input/src/keyboard.rs @@ -16,7 +16,7 @@ // the W3C short notice apply to the `KeyCode` enums and their variants and the // documentation attached to their variants. -// --------- BEGGINING OF W3C LICENSE -------------------------------------------------------------- +// --------- BEGINNING OF W3C LICENSE -------------------------------------------------------------- // // License // @@ -51,7 +51,7 @@ // // --------- END OF W3C LICENSE -------------------------------------------------------------------- -// --------- BEGGINING OF W3C SHORT NOTICE --------------------------------------------------------- +// --------- BEGINNING OF W3C SHORT NOTICE --------------------------------------------------------- // // winit: https://github.com/rust-windowing/winit // @@ -886,7 +886,7 @@ pub enum Key { Standby, /// The WakeUp key. (`KEYCODE_WAKEUP`) WakeUp, - /// Initate the multi-candidate mode. + /// Initiate the multi-candidate mode. AllCandidates, /// The Alphanumeric key (on linux/web) Alphanumeric, diff --git a/crates/bevy_macro_utils/src/bevy_manifest.rs b/crates/bevy_macro_utils/src/bevy_manifest.rs index 039f49f8bddd5..88ef781546574 100644 --- a/crates/bevy_macro_utils/src/bevy_manifest.rs +++ b/crates/bevy_macro_utils/src/bevy_manifest.rs @@ -103,7 +103,7 @@ impl BevyManifest { /// /// # Panics /// - /// Will panic if the path is not able to be parsed. For a non-panicing option, see [`try_parse_str`] + /// Will panic if the path is not able to be parsed. For a non-panicking option, see [`try_parse_str`] /// /// [`try_parse_str`]: Self::try_parse_str pub fn parse_str(path: &str) -> T { diff --git a/crates/bevy_mikktspace/src/generated.rs b/crates/bevy_mikktspace/src/generated.rs index 77945f71fa474..a69b1e8a27281 100644 --- a/crates/bevy_mikktspace/src/generated.rs +++ b/crates/bevy_mikktspace/src/generated.rs @@ -133,7 +133,7 @@ impl STriInfo { pub struct SGroup { pub iNrFaces: i32, pub pFaceIndices: *mut i32, - pub iVertexRepresentitive: i32, + pub iVertexRepresentative: i32, pub bOrientPreservering: bool, } @@ -142,7 +142,7 @@ impl SGroup { Self { iNrFaces: 0, pFaceIndices: null_mut(), - iVertexRepresentitive: 0, + iVertexRepresentative: 0, bOrientPreservering: false, } } @@ -560,7 +560,7 @@ unsafe fn GenerateTSpaces( piTriListIn, pTriInfos, geometry, - (*pGroup).iVertexRepresentitive, + (*pGroup).iVertexRepresentative, ); iUniqueSubGroups += 1 } @@ -634,7 +634,7 @@ unsafe fn EvalTspace( mut piTriListIn: *const i32, mut pTriInfos: *const STriInfo, geometry: &mut I, - iVertexRepresentitive: i32, + iVertexRepresentative: i32, ) -> STSpace { let mut res: STSpace = STSpace { vOs: Vec3::new(0.0, 0.0, 0.0), @@ -675,11 +675,11 @@ unsafe fn EvalTspace( let mut i0: i32 = -1i32; let mut i1: i32 = -1i32; let mut i2: i32 = -1i32; - if *piTriListIn.offset((3i32 * f + 0i32) as isize) == iVertexRepresentitive { + if *piTriListIn.offset((3i32 * f + 0i32) as isize) == iVertexRepresentative { i = 0i32 - } else if *piTriListIn.offset((3i32 * f + 1i32) as isize) == iVertexRepresentitive { + } else if *piTriListIn.offset((3i32 * f + 1i32) as isize) == iVertexRepresentative { i = 1i32 - } else if *piTriListIn.offset((3i32 * f + 2i32) as isize) == iVertexRepresentitive { + } else if *piTriListIn.offset((3i32 * f + 2i32) as isize) == iVertexRepresentative { i = 2i32 } index = *piTriListIn.offset((3i32 * f + i) as isize); @@ -831,7 +831,7 @@ unsafe fn Build4RuleGroups( let ref mut fresh2 = (*pTriInfos.offset(f as isize)).AssignedGroup[i as usize]; *fresh2 = &mut *pGroups.offset(iNrActiveGroups as isize) as *mut SGroup; (*(*pTriInfos.offset(f as isize)).AssignedGroup[i as usize]) - .iVertexRepresentitive = vert_index; + .iVertexRepresentative = vert_index; (*(*pTriInfos.offset(f as isize)).AssignedGroup[i as usize]).bOrientPreservering = (*pTriInfos.offset(f as isize)).iFlag & 8i32 != 0i32; (*(*pTriInfos.offset(f as isize)).AssignedGroup[i as usize]).iNrFaces = 0i32; @@ -897,7 +897,7 @@ unsafe fn AssignRecur( let mut pMyTriInfo: *mut STriInfo = &mut *psTriInfos.offset(iMyTriIndex as isize) as *mut STriInfo; // track down vertex - let iVertRep: i32 = (*pGroup).iVertexRepresentitive; + let iVertRep: i32 = (*pGroup).iVertexRepresentative; let mut pVerts: *const i32 = &*piTriListIn.offset((3i32 * iMyTriIndex + 0i32) as isize) as *const i32; let mut i: i32 = -1i32; diff --git a/crates/bevy_pbr/src/material.rs b/crates/bevy_pbr/src/material.rs index 5f8bce5dfe7bb..7811df5d612a6 100644 --- a/crates/bevy_pbr/src/material.rs +++ b/crates/bevy_pbr/src/material.rs @@ -802,7 +802,7 @@ pub struct MaterialBindGroupId(Option); pub struct AtomicMaterialBindGroupId(AtomicU32); impl AtomicMaterialBindGroupId { - /// Stores a value atomically. Uses [`Ordering::Relaxed`] so there is zero guarentee of ordering + /// Stores a value atomically. Uses [`Ordering::Relaxed`] so there is zero guarantee of ordering /// relative to other operations. /// /// See also: [`AtomicU32::store`]. @@ -815,7 +815,7 @@ impl AtomicMaterialBindGroupId { self.0.store(id, Ordering::Relaxed); } - /// Loads a value atomically. Uses [`Ordering::Relaxed`] so there is zero guarentee of ordering + /// Loads a value atomically. Uses [`Ordering::Relaxed`] so there is zero guarantee of ordering /// relative to other operations. /// /// See also: [`AtomicU32::load`]. diff --git a/crates/bevy_pbr/src/pbr_material.rs b/crates/bevy_pbr/src/pbr_material.rs index 3c017fbc4be79..231da8c9e43d0 100644 --- a/crates/bevy_pbr/src/pbr_material.rs +++ b/crates/bevy_pbr/src/pbr_material.rs @@ -248,7 +248,7 @@ pub struct StandardMaterial { /// | Flint Glass | 1.69 | /// | Ruby | 1.71 | /// | Glycerine | 1.74 | - /// | Saphire | 1.77 | + /// | Sapphire | 1.77 | /// | Cubic Zirconia | 2.15 | /// | Diamond | 2.42 | /// | Moissanite | 2.65 | diff --git a/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs b/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs index 1a5e01bff5d6d..5e619cf1ade45 100644 --- a/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs +++ b/crates/bevy_reflect/bevy_reflect_derive/src/utility.rs @@ -407,7 +407,7 @@ impl FromIterator for StringExpr { } } -/// Returns a [`syn::parse::Parser`] which parses a stream of zero or more occurences of `T` +/// Returns a [`syn::parse::Parser`] which parses a stream of zero or more occurrences of `T` /// separated by punctuation of type `P`, with optional trailing punctuation. /// /// This is functionally the same as [`Punctuated::parse_terminated`], diff --git a/crates/bevy_reflect/src/lib.rs b/crates/bevy_reflect/src/lib.rs index b11bbbf6ac1ab..0c909ae093aa5 100644 --- a/crates/bevy_reflect/src/lib.rs +++ b/crates/bevy_reflect/src/lib.rs @@ -1917,7 +1917,7 @@ bevy_reflect::tests::Test { } #[test] - fn should_allow_custom_where_wtih_assoc_type() { + fn should_allow_custom_where_with_assoc_type() { trait Trait { type Assoc; } diff --git a/crates/bevy_reflect/src/path/error.rs b/crates/bevy_reflect/src/path/error.rs index 6716485ba7dc6..eeb4647ad07ab 100644 --- a/crates/bevy_reflect/src/path/error.rs +++ b/crates/bevy_reflect/src/path/error.rs @@ -63,7 +63,7 @@ impl<'a> AccessError<'a> { &self.kind } - /// The returns the [`Access`] that this [`AccessError`] occured in. + /// The returns the [`Access`] that this [`AccessError`] occurred in. pub const fn access(&self) -> &Access { &self.access } diff --git a/crates/bevy_reflect/src/path/mod.rs b/crates/bevy_reflect/src/path/mod.rs index 6fbb88998647d..a1d92732aec4c 100644 --- a/crates/bevy_reflect/src/path/mod.rs +++ b/crates/bevy_reflect/src/path/mod.rs @@ -27,11 +27,11 @@ pub enum ReflectPathError<'a> { InvalidDowncast, /// An error caused by an invalid path string that couldn't be parsed. - #[error("Encounted an error at offset {offset} while parsing `{path}`: {error}")] + #[error("Encountered an error at offset {offset} while parsing `{path}`: {error}")] ParseError { /// Position in `path`. offset: usize, - /// The path that the error occured in. + /// The path that the error occurred in. path: &'a str, /// The underlying error. error: ParseError<'a>, diff --git a/crates/bevy_sprite/src/lib.rs b/crates/bevy_sprite/src/lib.rs index ace0bd0a83e2b..7ae9207dbe8ca 100644 --- a/crates/bevy_sprite/src/lib.rs +++ b/crates/bevy_sprite/src/lib.rs @@ -189,7 +189,7 @@ mod test { // Add system app.add_systems(Update, calculate_bounds_2d); - // Add entites + // Add entities let entity = app.world.spawn((Sprite::default(), image_handle)).id(); // Verify that the entity does not have an AABB @@ -227,7 +227,7 @@ mod test { // Add system app.add_systems(Update, calculate_bounds_2d); - // Add entites + // Add entities let entity = app .world .spawn(( diff --git a/crates/bevy_ui/src/ui_node.rs b/crates/bevy_ui/src/ui_node.rs index ddbe439e92db0..8e42dead8b1c6 100644 --- a/crates/bevy_ui/src/ui_node.rs +++ b/crates/bevy_ui/src/ui_node.rs @@ -26,7 +26,7 @@ use thiserror::Error; #[reflect(Component, Default)] pub struct Node { /// The order of the node in the UI layout. - /// Nodes with a higher stack index are drawn on top of and recieve interactions before nodes with lower stack indices. + /// Nodes with a higher stack index are drawn on top of and receive interactions before nodes with lower stack indices. pub(crate) stack_index: u32, /// The size of the node as width and height in logical pixels /// @@ -54,7 +54,7 @@ impl Node { } /// The order of the node in the UI layout. - /// Nodes with a higher stack index are drawn on top of and recieve interactions before nodes with lower stack indices. + /// Nodes with a higher stack index are drawn on top of and receive interactions before nodes with lower stack indices. pub const fn stack_index(&self) -> u32 { self.stack_index } @@ -1835,10 +1835,10 @@ mod tests { } /// Indicates that this root [`Node`] entity should be rendered to a specific camera. -/// UI then will be layed out respecting the camera's viewport and scale factor, and +/// UI then will be laid out respecting the camera's viewport and scale factor, and /// rendered to this camera's [`bevy_render::camera::RenderTarget`]. /// -/// Setting this component on a non-root node will have no effect. It will be overriden +/// Setting this component on a non-root node will have no effect. It will be overridden /// by the root node's component. /// /// Optional if there is only one camera in the world. Required otherwise. diff --git a/crates/bevy_utils/src/parallel_queue.rs b/crates/bevy_utils/src/parallel_queue.rs index 91fdb2a9eef54..a0e342caff72d 100644 --- a/crates/bevy_utils/src/parallel_queue.rs +++ b/crates/bevy_utils/src/parallel_queue.rs @@ -57,7 +57,7 @@ impl Parallel> { /// Collect all enqueued items from all threads and appends them to the end of a /// single Vec. /// - /// The ordering is not guarenteed. + /// The ordering is not guaranteed. pub fn drain_into(&mut self, out: &mut Vec) { let size = self .locals diff --git a/examples/app/logs.rs b/examples/app/logs.rs index 851d55a2ab687..a2f46bbf79f2c 100644 --- a/examples/app/logs.rs +++ b/examples/app/logs.rs @@ -70,7 +70,7 @@ fn log_once_system() { } // you can also use the 'once!' macro directly, in situations you want do do - // something expensive only once within the context of a continous system. + // something expensive only once within the context of a continuous system. once!({ info!("doing expensive things"); let mut a: u64 = 0; diff --git a/examples/app/return_after_run.rs b/examples/app/return_after_run.rs index eb5bae6d3caa5..0c3493f6b1676 100644 --- a/examples/app/return_after_run.rs +++ b/examples/app/return_after_run.rs @@ -3,7 +3,7 @@ //! In windowed *Bevy* applications, executing code below a call to `App::run()` is //! not recommended because: //! - `App::run()` will never return on iOS and Web. -//! - It is not possible to recreate a window afer the event loop has been terminated. +//! - It is not possible to recreate a window after the event loop has been terminated. use bevy::{prelude::*, window::WindowPlugin}; diff --git a/examples/asset/asset_decompression.rs b/examples/asset/asset_decompression.rs index 70f07d13a4553..1c72521b0eb7a 100644 --- a/examples/asset/asset_decompression.rs +++ b/examples/asset/asset_decompression.rs @@ -30,7 +30,7 @@ pub enum GzAssetLoaderError { /// An [IO](std::io) Error #[error("Could not load asset: {0}")] Io(#[from] std::io::Error), - /// An error caused when the asset path cannot be used ot determine the uncompressed asset type. + /// An error caused when the asset path cannot be used to determine the uncompressed asset type. #[error("Could not determine file path of uncompressed asset")] IndeterminateFilePath, /// An error caused by the internal asset loader. diff --git a/examples/asset/processing/asset_processing.rs b/examples/asset/processing/asset_processing.rs index 6acfc55504ce4..640d0cdabf369 100644 --- a/examples/asset/processing/asset_processing.rs +++ b/examples/asset/processing/asset_processing.rs @@ -1,4 +1,4 @@ -//! This example illustrates how to define custom `AssetLoader`s, `AssetTransfomers`, and `AssetSaver`s, how to configure them, and how to register asset processors. +//! This example illustrates how to define custom `AssetLoader`s, `AssetTransformer`s, and `AssetSaver`s, how to configure them, and how to register asset processors. use bevy::{ asset::{ diff --git a/examples/ecs/dynamic.rs b/examples/ecs/dynamic.rs index 3537f335fca90..9b0c41ef04f6b 100644 --- a/examples/ecs/dynamic.rs +++ b/examples/ecs/dynamic.rs @@ -23,12 +23,12 @@ Enter a command with no parameters for usage."; const COMPONENT_PROMPT: &str = " comp, c Create new components - Enter a comma seperated list of type names optionally followed by a size in u64s. + Enter a comma separated list of type names optionally followed by a size in u64s. e.g. CompA 3, CompB, CompC 2"; const ENTITY_PROMPT: &str = " spawn, s Spawn entities - Enter a comma seperated list of components optionally followed by values. + Enter a comma separated list of components optionally followed by values. e.g. CompA 0 1 0, CompB, CompC 1"; const QUERY_PROMPT: &str = " diff --git a/examples/ecs/send_and_receive_events.rs b/examples/ecs/send_and_receive_events.rs index cd2d8c4af3a5d..cc083b0853c86 100644 --- a/examples/ecs/send_and_receive_events.rs +++ b/examples/ecs/send_and_receive_events.rs @@ -12,7 +12,7 @@ //! 2. Use a [`Local`] [`ManualEventReader`] instead of an [`EventReader`], and use [`ResMut`] to access [`Events`]. //! //! In the first case, you're being careful to only check out only one of the [`EventWriter`] or [`EventReader`] at a time. -//! By "temporally" seperating them, you avoid the overlap. +//! By "temporally" separating them, you avoid the overlap. //! //! In the second case, you only ever have one access to the underlying [`Events`] resource at a time. //! But in exchange, you have to manually keep track of which events you've already read. diff --git a/examples/math/render_primitives.rs b/examples/math/render_primitives.rs index bfd1d38486747..5984f7a5f66c8 100644 --- a/examples/math/render_primitives.rs +++ b/examples/math/render_primitives.rs @@ -82,7 +82,7 @@ enum PrimitiveSelected { Capsule, Cylinder, Cone, - ConicalFrustrum, + ConicalFrustum, Torus, } @@ -112,7 +112,7 @@ impl PrimitiveSelected { Self::Capsule, Self::Cylinder, Self::Cone, - Self::ConicalFrustrum, + Self::ConicalFrustum, Self::Torus, ]; @@ -239,7 +239,7 @@ const CONE: Cone = Cone { height: BIG_3D, }; -const CONICAL_FRUSTRUM: ConicalFrustum = ConicalFrustum { +const CONICAL_FRUSTUM: ConicalFrustum = ConicalFrustum { radius_top: BIG_3D, radius_bottom: SMALL_3D, height: BIG_3D, @@ -432,7 +432,7 @@ fn draw_gizmos_2d(mut gizmos: Gizmos, state: Res>, time PrimitiveSelected::Capsule => gizmos.primitive_2d(CAPSULE_2D, POSITION, angle, color), PrimitiveSelected::Cylinder => {} PrimitiveSelected::Cone => {} - PrimitiveSelected::ConicalFrustrum => {} + PrimitiveSelected::ConicalFrustum => {} PrimitiveSelected::Torus => {} } } @@ -474,7 +474,7 @@ fn spawn_primitive_2d( Some(CAPSULE_2D.mesh().build()), None, // cylinder None, // cone - None, // conical frustrum + None, // conical frustum None, // torus ] .into_iter() @@ -520,7 +520,7 @@ fn spawn_primitive_3d( Some(CAPSULE_3D.mesh().build()), Some(CYLINDER.mesh().build()), None, // cone - None, // conical frustrum + None, // conical frustum Some(TORUS.mesh().build()), ] .into_iter() @@ -648,8 +648,8 @@ fn draw_gizmos_3d(mut gizmos: Gizmos, state: Res>, time .primitive_3d(CONE, POSITION, rotation, color) .segments(segments), ), - PrimitiveSelected::ConicalFrustrum => { - gizmos.primitive_3d(CONICAL_FRUSTRUM, POSITION, rotation, color); + PrimitiveSelected::ConicalFrustum => { + gizmos.primitive_3d(CONICAL_FRUSTUM, POSITION, rotation, color); } PrimitiveSelected::Torus => drop(