fix some typos (#12038)

# 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 <alice.i.cecile@gmail.com>
Co-authored-by: James Liu <contact@jamessliu.com>
Co-authored-by: François <mockersf@gmail.com>
This commit is contained in:
Ame 2024-02-22 12:55:22 -06:00 committed by GitHub
parent 5d3f66fbaf
commit 9d67edc3a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
34 changed files with 72 additions and 72 deletions

View File

@ -1005,8 +1005,8 @@ impl App {
/// (conflicting access but indeterminate order) with systems in `set`. /// (conflicting access but indeterminate order) with systems in `set`.
/// ///
/// When possible, do this directly in the `.add_systems(Update, a.ambiguous_with(b))` call. /// 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 /// However, sometimes two independent plugins `A` and `B` are reported as ambiguous, which you
/// can only supress as the consumer of both. /// can only suppress as the consumer of both.
#[track_caller] #[track_caller]
pub fn ignore_ambiguity<M1, M2, S1, S2>( pub fn ignore_ambiguity<M1, M2, S1, S2>(
&mut self, &mut self,

View File

@ -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 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")] #[error("Asset label must not contain a `://` substring")]
InvalidLabelSyntax, 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 `://`")] #[error("Asset source must be at least one character. Either specify the source before the '://' or remove the `://`")]
MissingSource, MissingSource,
/// Error that occurs when a path string has an [`AssetPath::label`] delimiter `#` with no characters succeeding it. E.g. `file.test#` /// 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; let mut label_range = None;
// Loop through the characters of the passed in &str to accomplish the following: // 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`. // 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` // 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`, // 3. Set the `path_range` to be everything in between the `source_range` and `label_range`,
// excluding the `://` substring and `#` character. // excluding the `://` substring and `#` character.
@ -165,7 +165,7 @@ impl<'a> AssetPath<'a> {
2 => { 2 => {
// If we haven't found our first `AssetPath::source` yet, check to make sure it is valid and then store it. // 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 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() { if label_range.is_some() {
return Err(ParseAssetPathError::InvalidSourceSyntax); return Err(ParseAssetPathError::InvalidSourceSyntax);
} }
@ -833,7 +833,7 @@ mod tests {
#[test] #[test]
fn test_resolve_implicit_relative() { 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"); let base = AssetPath::from("alice/bob#carol");
assert_eq!( assert_eq!(
base.resolve("joe/next").unwrap(), base.resolve("joe/next").unwrap(),

View File

@ -18,7 +18,7 @@ pub trait AssetTransformer: Send + Sync + 'static {
/// The type of [error](`std::error::Error`) which could be encountered by this transformer. /// The type of [error](`std::error::Error`) which could be encountered by this transformer.
type Error: Into<Box<dyn std::error::Error + Send + Sync + 'static>>; type Error: Into<Box<dyn std::error::Error + Send + Sync + 'static>>;
/// 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 [`TransformedAsset`]'s `labeled_assets` can be altered to add new Labeled Sub-Assets
/// The passed in `settings` can influence how the `asset` is transformed /// The passed in `settings` can influence how the `asset` is transformed
fn transform<'a>( fn transform<'a>(
@ -58,7 +58,7 @@ impl<A: Asset> TransformedAsset<A> {
} }
None 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<B: Asset>(self, asset: B) -> TransformedAsset<B> { pub fn replace_asset<B: Asset>(self, asset: B) -> TransformedAsset<B> {
TransformedAsset { TransformedAsset {
value: asset, value: asset,

View File

@ -142,17 +142,17 @@ impl Plugin for CASPlugin {
} }
{ {
render_app render_app
.add_render_graph_node::<CASNode>(Core2d, Node2d::ConstrastAdaptiveSharpening) .add_render_graph_node::<CASNode>(Core2d, Node2d::ContrastAdaptiveSharpening)
.add_render_graph_edge( .add_render_graph_edge(
Core2d, Core2d,
Node2d::Tonemapping, Node2d::Tonemapping,
Node2d::ConstrastAdaptiveSharpening, Node2d::ContrastAdaptiveSharpening,
) )
.add_render_graph_edges( .add_render_graph_edges(
Core2d, Core2d,
( (
Node2d::Fxaa, Node2d::Fxaa,
Node2d::ConstrastAdaptiveSharpening, Node2d::ContrastAdaptiveSharpening,
Node2d::EndMainPassPostProcessing, Node2d::EndMainPassPostProcessing,
), ),
); );

View File

@ -19,7 +19,7 @@ pub mod graph {
Tonemapping, Tonemapping,
Fxaa, Fxaa,
Upscaling, Upscaling,
ConstrastAdaptiveSharpening, ContrastAdaptiveSharpening,
EndMainPassPostProcessing, EndMainPassPostProcessing,
} }
} }

View File

@ -4,7 +4,7 @@
use std::fmt; use std::fmt;
/// An Error type for [`super::Identifier`], mostly for providing error /// 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)] #[derive(Debug, PartialEq, Eq, Clone, Copy)]
#[non_exhaustive] #[non_exhaustive]
pub enum IdentifierError { pub enum IdentifierError {

View File

@ -67,7 +67,7 @@ impl IdentifierMask {
let overflowed = lo >> 31; let overflowed = lo >> 31;
// SAFETY: // 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` // - The sum of `0x7FFF_FFFF` + `u32::MAX` + 1 (overflow) == `0x7FFF_FFFF`
// - If the operation doesn't overflow at 31 bits, no offsetting takes place // - If the operation doesn't overflow at 31 bits, no offsetting takes place
unsafe { NonZeroU32::new_unchecked(lo.wrapping_add(overflowed) & HIGH_MASK) } unsafe { NonZeroU32::new_unchecked(lo.wrapping_add(overflowed) & HIGH_MASK) }

View File

@ -210,7 +210,7 @@ impl<'w, D: QueryData, F: QueryFilter> QueryBuilder<'w, D, F> {
} }
/// Transmute the existing builder adding required accesses. /// 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`] /// If including a filter type see [`Self::transmute_filtered`]
pub fn transmute<NewD: QueryData>(&mut self) -> &mut QueryBuilder<'w, NewD> { pub fn transmute<NewD: QueryData>(&mut self) -> &mut QueryBuilder<'w, NewD> {
@ -233,7 +233,7 @@ impl<'w, D: QueryData, F: QueryFilter> QueryBuilder<'w, D, F> {
self.extend_access(access); self.extend_access(access);
// SAFETY: // 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 // - The layout of all QueryBuilder instances is the same
unsafe { std::mem::transmute(self) } unsafe { std::mem::transmute(self) }
} }

View File

@ -59,7 +59,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryIter<'w, 's, D, F> {
Func: FnMut(D::Item<'w>), Func: FnMut(D::Item<'w>),
{ {
// SAFETY: Caller assures that D::IS_DENSE and F::IS_DENSE are true, that table matches D and F // 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 { unsafe {
self.fold_over_table_range((), &mut |_, item| func(item), table, rows); self.fold_over_table_range((), &mut |_, item| func(item), table, rows);
} }

View File

@ -1,5 +1,5 @@
//! Definitions for [`FromWorld`] reflection. //! 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. //! require an `&mut World` to be initialized.
//! //!
//! This module exports two types: [`ReflectFromWorldFns`] and [`ReflectFromWorld`]. //! This module exports two types: [`ReflectFromWorldFns`] and [`ReflectFromWorld`].

View File

@ -419,7 +419,7 @@ where
/// ///
/// Ordering constraints will be applied between the successive elements. /// 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 /// will be inserted on the edge. If this behavior is not desired consider using
/// [`chain_ignore_deferred`](Self::chain_ignore_deferred) instead. /// [`chain_ignore_deferred`](Self::chain_ignore_deferred) instead.
fn chain(self) -> SystemConfigs { fn chain(self) -> SystemConfigs {

View File

@ -161,7 +161,7 @@ fn make_executor(kind: ExecutorKind) -> Box<dyn SystemExecutor> {
/// Chain systems into dependencies /// Chain systems into dependencies
#[derive(PartialEq)] #[derive(PartialEq)]
pub enum Chain { 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. /// [`apply_deferred`] will be added on the edge.
Yes, Yes,
/// Run nodes in order. This will not add [`apply_deferred`] between nodes. /// Run nodes in order. This will not add [`apply_deferred`] between nodes.

View File

@ -1290,7 +1290,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> Query<'w, 's, D, F> {
/// ## Allowed Transmutes /// ## Allowed Transmutes
/// ///
/// Besides removing parameters from the query, you can also /// 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` /// * Can always add/remove `Entity`
/// * `Ref<T>` <-> `&T` /// * `Ref<T>` <-> `&T`

View File

@ -697,8 +697,8 @@ unsafe impl SystemParam for &'_ World {
/// # use bevy_ecs::system::assert_is_system; /// # use bevy_ecs::system::assert_is_system;
/// struct Config(u32); /// struct Config(u32);
/// #[derive(Resource)] /// #[derive(Resource)]
/// struct Myu32Wrapper(u32); /// struct MyU32Wrapper(u32);
/// fn reset_to_system(value: Config) -> impl FnMut(ResMut<Myu32Wrapper>) { /// fn reset_to_system(value: Config) -> impl FnMut(ResMut<MyU32Wrapper>) {
/// move |mut val| val.0 = value.0 /// move |mut val| val.0 = value.0
/// } /// }
/// ///

View File

@ -698,9 +698,9 @@ pub struct ConicalFrustum3dBuilder<'a, 'w, 's, T: GizmoConfigGroup> {
// Center of conical frustum, half-way between the top and the bottom // Center of conical frustum, half-way between the top and the bottom
position: Vec3, 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, rotation: Quat,
// Color of the conical frustum // Color of the conical frustum
color: Color, color: Color,
@ -760,7 +760,7 @@ impl<T: GizmoConfigGroup> Drop for ConicalFrustum3dBuilder<'_, '_, '_, T> {
let half_height = *height * 0.5; let half_height = *height * 0.5;
let normal = *rotation * Vec3::Y; 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)] [(*radius_top, half_height), (*radius_bottom, -half_height)]
.into_iter() .into_iter()
.for_each(|(radius, height)| { .for_each(|(radius, height)| {
@ -774,7 +774,7 @@ impl<T: GizmoConfigGroup> 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) circle_coordinates(*radius_top, *segments)
.map(move |p| Vec3::new(p.x, half_height, p.y)) .map(move |p| Vec3::new(p.x, half_height, p.y))
.zip( .zip(
@ -802,7 +802,7 @@ pub struct Torus3dBuilder<'a, 'w, 's, T: GizmoConfigGroup> {
// Center of the torus // Center of the torus
position: Vec3, position: Vec3,
// Rotation of the conical frustrum // Rotation of the conical frustum
// //
// default orientation is: major circle normal is aligned with `Vec3::Y` axis // default orientation is: major circle normal is aligned with `Vec3::Y` axis
rotation: Quat, rotation: Quat,

View File

@ -16,7 +16,7 @@
// the W3C short notice apply to the `KeyCode` enums and their variants and the // the W3C short notice apply to the `KeyCode` enums and their variants and the
// documentation attached to their variants. // documentation attached to their variants.
// --------- BEGGINING OF W3C LICENSE -------------------------------------------------------------- // --------- BEGINNING OF W3C LICENSE --------------------------------------------------------------
// //
// License // License
// //
@ -51,7 +51,7 @@
// //
// --------- END OF W3C LICENSE -------------------------------------------------------------------- // --------- END OF W3C LICENSE --------------------------------------------------------------------
// --------- BEGGINING OF W3C SHORT NOTICE --------------------------------------------------------- // --------- BEGINNING OF W3C SHORT NOTICE ---------------------------------------------------------
// //
// winit: https://github.com/rust-windowing/winit // winit: https://github.com/rust-windowing/winit
// //
@ -886,7 +886,7 @@ pub enum Key {
Standby, Standby,
/// The WakeUp key. (`KEYCODE_WAKEUP`) /// The WakeUp key. (`KEYCODE_WAKEUP`)
WakeUp, WakeUp,
/// Initate the multi-candidate mode. /// Initiate the multi-candidate mode.
AllCandidates, AllCandidates,
/// The Alphanumeric key (on linux/web) /// The Alphanumeric key (on linux/web)
Alphanumeric, Alphanumeric,

View File

@ -103,7 +103,7 @@ impl BevyManifest {
/// ///
/// # Panics /// # 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 /// [`try_parse_str`]: Self::try_parse_str
pub fn parse_str<T: syn::parse::Parse>(path: &str) -> T { pub fn parse_str<T: syn::parse::Parse>(path: &str) -> T {

View File

@ -133,7 +133,7 @@ impl STriInfo {
pub struct SGroup { pub struct SGroup {
pub iNrFaces: i32, pub iNrFaces: i32,
pub pFaceIndices: *mut i32, pub pFaceIndices: *mut i32,
pub iVertexRepresentitive: i32, pub iVertexRepresentative: i32,
pub bOrientPreservering: bool, pub bOrientPreservering: bool,
} }
@ -142,7 +142,7 @@ impl SGroup {
Self { Self {
iNrFaces: 0, iNrFaces: 0,
pFaceIndices: null_mut(), pFaceIndices: null_mut(),
iVertexRepresentitive: 0, iVertexRepresentative: 0,
bOrientPreservering: false, bOrientPreservering: false,
} }
} }
@ -560,7 +560,7 @@ unsafe fn GenerateTSpaces<I: Geometry>(
piTriListIn, piTriListIn,
pTriInfos, pTriInfos,
geometry, geometry,
(*pGroup).iVertexRepresentitive, (*pGroup).iVertexRepresentative,
); );
iUniqueSubGroups += 1 iUniqueSubGroups += 1
} }
@ -634,7 +634,7 @@ unsafe fn EvalTspace<I: Geometry>(
mut piTriListIn: *const i32, mut piTriListIn: *const i32,
mut pTriInfos: *const STriInfo, mut pTriInfos: *const STriInfo,
geometry: &mut I, geometry: &mut I,
iVertexRepresentitive: i32, iVertexRepresentative: i32,
) -> STSpace { ) -> STSpace {
let mut res: STSpace = STSpace { let mut res: STSpace = STSpace {
vOs: Vec3::new(0.0, 0.0, 0.0), vOs: Vec3::new(0.0, 0.0, 0.0),
@ -675,11 +675,11 @@ unsafe fn EvalTspace<I: Geometry>(
let mut i0: i32 = -1i32; let mut i0: i32 = -1i32;
let mut i1: i32 = -1i32; let mut i1: i32 = -1i32;
let mut i2: 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 i = 0i32
} else if *piTriListIn.offset((3i32 * f + 1i32) as isize) == iVertexRepresentitive { } else if *piTriListIn.offset((3i32 * f + 1i32) as isize) == iVertexRepresentative {
i = 1i32 i = 1i32
} else if *piTriListIn.offset((3i32 * f + 2i32) as isize) == iVertexRepresentitive { } else if *piTriListIn.offset((3i32 * f + 2i32) as isize) == iVertexRepresentative {
i = 2i32 i = 2i32
} }
index = *piTriListIn.offset((3i32 * f + i) as isize); 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]; let ref mut fresh2 = (*pTriInfos.offset(f as isize)).AssignedGroup[i as usize];
*fresh2 = &mut *pGroups.offset(iNrActiveGroups as isize) as *mut SGroup; *fresh2 = &mut *pGroups.offset(iNrActiveGroups as isize) as *mut SGroup;
(*(*pTriInfos.offset(f as isize)).AssignedGroup[i as usize]) (*(*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)).AssignedGroup[i as usize]).bOrientPreservering =
(*pTriInfos.offset(f as isize)).iFlag & 8i32 != 0i32; (*pTriInfos.offset(f as isize)).iFlag & 8i32 != 0i32;
(*(*pTriInfos.offset(f as isize)).AssignedGroup[i as usize]).iNrFaces = 0i32; (*(*pTriInfos.offset(f as isize)).AssignedGroup[i as usize]).iNrFaces = 0i32;
@ -897,7 +897,7 @@ unsafe fn AssignRecur(
let mut pMyTriInfo: *mut STriInfo = let mut pMyTriInfo: *mut STriInfo =
&mut *psTriInfos.offset(iMyTriIndex as isize) as *mut STriInfo; &mut *psTriInfos.offset(iMyTriIndex as isize) as *mut STriInfo;
// track down vertex // track down vertex
let iVertRep: i32 = (*pGroup).iVertexRepresentitive; let iVertRep: i32 = (*pGroup).iVertexRepresentative;
let mut pVerts: *const i32 = let mut pVerts: *const i32 =
&*piTriListIn.offset((3i32 * iMyTriIndex + 0i32) as isize) as *const i32; &*piTriListIn.offset((3i32 * iMyTriIndex + 0i32) as isize) as *const i32;
let mut i: i32 = -1i32; let mut i: i32 = -1i32;

View File

@ -802,7 +802,7 @@ pub struct MaterialBindGroupId(Option<BindGroupId>);
pub struct AtomicMaterialBindGroupId(AtomicU32); pub struct AtomicMaterialBindGroupId(AtomicU32);
impl AtomicMaterialBindGroupId { 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. /// relative to other operations.
/// ///
/// See also: [`AtomicU32::store`]. /// See also: [`AtomicU32::store`].
@ -815,7 +815,7 @@ impl AtomicMaterialBindGroupId {
self.0.store(id, Ordering::Relaxed); 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. /// relative to other operations.
/// ///
/// See also: [`AtomicU32::load`]. /// See also: [`AtomicU32::load`].

View File

@ -248,7 +248,7 @@ pub struct StandardMaterial {
/// | Flint Glass | 1.69 | /// | Flint Glass | 1.69 |
/// | Ruby | 1.71 | /// | Ruby | 1.71 |
/// | Glycerine | 1.74 | /// | Glycerine | 1.74 |
/// | Saphire | 1.77 | /// | Sapphire | 1.77 |
/// | Cubic Zirconia | 2.15 | /// | Cubic Zirconia | 2.15 |
/// | Diamond | 2.42 | /// | Diamond | 2.42 |
/// | Moissanite | 2.65 | /// | Moissanite | 2.65 |

View File

@ -407,7 +407,7 @@ impl FromIterator<StringExpr> 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. /// separated by punctuation of type `P`, with optional trailing punctuation.
/// ///
/// This is functionally the same as [`Punctuated::parse_terminated`], /// This is functionally the same as [`Punctuated::parse_terminated`],

View File

@ -1917,7 +1917,7 @@ bevy_reflect::tests::Test {
} }
#[test] #[test]
fn should_allow_custom_where_wtih_assoc_type() { fn should_allow_custom_where_with_assoc_type() {
trait Trait { trait Trait {
type Assoc; type Assoc;
} }

View File

@ -63,7 +63,7 @@ impl<'a> AccessError<'a> {
&self.kind &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 { pub const fn access(&self) -> &Access {
&self.access &self.access
} }

View File

@ -27,11 +27,11 @@ pub enum ReflectPathError<'a> {
InvalidDowncast, InvalidDowncast,
/// An error caused by an invalid path string that couldn't be parsed. /// 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 { ParseError {
/// Position in `path`. /// Position in `path`.
offset: usize, offset: usize,
/// The path that the error occured in. /// The path that the error occurred in.
path: &'a str, path: &'a str,
/// The underlying error. /// The underlying error.
error: ParseError<'a>, error: ParseError<'a>,

View File

@ -189,7 +189,7 @@ mod test {
// Add system // Add system
app.add_systems(Update, calculate_bounds_2d); app.add_systems(Update, calculate_bounds_2d);
// Add entites // Add entities
let entity = app.world.spawn((Sprite::default(), image_handle)).id(); let entity = app.world.spawn((Sprite::default(), image_handle)).id();
// Verify that the entity does not have an AABB // Verify that the entity does not have an AABB
@ -227,7 +227,7 @@ mod test {
// Add system // Add system
app.add_systems(Update, calculate_bounds_2d); app.add_systems(Update, calculate_bounds_2d);
// Add entites // Add entities
let entity = app let entity = app
.world .world
.spawn(( .spawn((

View File

@ -26,7 +26,7 @@ use thiserror::Error;
#[reflect(Component, Default)] #[reflect(Component, Default)]
pub struct Node { pub struct Node {
/// The order of the node in the UI layout. /// 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, pub(crate) stack_index: u32,
/// The size of the node as width and height in logical pixels /// 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. /// 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 { pub const fn stack_index(&self) -> u32 {
self.stack_index self.stack_index
} }
@ -1835,10 +1835,10 @@ mod tests {
} }
/// Indicates that this root [`Node`] entity should be rendered to a specific camera. /// 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`]. /// 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. /// by the root node's component.
/// ///
/// Optional if there is only one camera in the world. Required otherwise. /// Optional if there is only one camera in the world. Required otherwise.

View File

@ -57,7 +57,7 @@ impl<T: Send> Parallel<Vec<T>> {
/// Collect all enqueued items from all threads and appends them to the end of a /// Collect all enqueued items from all threads and appends them to the end of a
/// single Vec. /// single Vec.
/// ///
/// The ordering is not guarenteed. /// The ordering is not guaranteed.
pub fn drain_into(&mut self, out: &mut Vec<T>) { pub fn drain_into(&mut self, out: &mut Vec<T>) {
let size = self let size = self
.locals .locals

View File

@ -70,7 +70,7 @@ fn log_once_system() {
} }
// you can also use the 'once!' macro directly, in situations you want do do // 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!({ once!({
info!("doing expensive things"); info!("doing expensive things");
let mut a: u64 = 0; let mut a: u64 = 0;

View File

@ -3,7 +3,7 @@
//! In windowed *Bevy* applications, executing code below a call to `App::run()` is //! In windowed *Bevy* applications, executing code below a call to `App::run()` is
//! not recommended because: //! not recommended because:
//! - `App::run()` will never return on iOS and Web. //! - `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}; use bevy::{prelude::*, window::WindowPlugin};

View File

@ -30,7 +30,7 @@ pub enum GzAssetLoaderError {
/// An [IO](std::io) Error /// An [IO](std::io) Error
#[error("Could not load asset: {0}")] #[error("Could not load asset: {0}")]
Io(#[from] std::io::Error), 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")] #[error("Could not determine file path of uncompressed asset")]
IndeterminateFilePath, IndeterminateFilePath,
/// An error caused by the internal asset loader. /// An error caused by the internal asset loader.

View File

@ -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::{ use bevy::{
asset::{ asset::{

View File

@ -23,12 +23,12 @@ Enter a command with no parameters for usage.";
const COMPONENT_PROMPT: &str = " const COMPONENT_PROMPT: &str = "
comp, c Create new components 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"; e.g. CompA 3, CompB, CompC 2";
const ENTITY_PROMPT: &str = " const ENTITY_PROMPT: &str = "
spawn, s Spawn entities 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"; e.g. CompA 0 1 0, CompB, CompC 1";
const QUERY_PROMPT: &str = " const QUERY_PROMPT: &str = "

View File

@ -12,7 +12,7 @@
//! 2. Use a [`Local`] [`ManualEventReader`] instead of an [`EventReader`], and use [`ResMut`] to access [`Events`]. //! 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. //! 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. //! 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. //! But in exchange, you have to manually keep track of which events you've already read.

View File

@ -82,7 +82,7 @@ enum PrimitiveSelected {
Capsule, Capsule,
Cylinder, Cylinder,
Cone, Cone,
ConicalFrustrum, ConicalFrustum,
Torus, Torus,
} }
@ -112,7 +112,7 @@ impl PrimitiveSelected {
Self::Capsule, Self::Capsule,
Self::Cylinder, Self::Cylinder,
Self::Cone, Self::Cone,
Self::ConicalFrustrum, Self::ConicalFrustum,
Self::Torus, Self::Torus,
]; ];
@ -239,7 +239,7 @@ const CONE: Cone = Cone {
height: BIG_3D, height: BIG_3D,
}; };
const CONICAL_FRUSTRUM: ConicalFrustum = ConicalFrustum { const CONICAL_FRUSTUM: ConicalFrustum = ConicalFrustum {
radius_top: BIG_3D, radius_top: BIG_3D,
radius_bottom: SMALL_3D, radius_bottom: SMALL_3D,
height: BIG_3D, height: BIG_3D,
@ -432,7 +432,7 @@ fn draw_gizmos_2d(mut gizmos: Gizmos, state: Res<State<PrimitiveSelected>>, time
PrimitiveSelected::Capsule => gizmos.primitive_2d(CAPSULE_2D, POSITION, angle, color), PrimitiveSelected::Capsule => gizmos.primitive_2d(CAPSULE_2D, POSITION, angle, color),
PrimitiveSelected::Cylinder => {} PrimitiveSelected::Cylinder => {}
PrimitiveSelected::Cone => {} PrimitiveSelected::Cone => {}
PrimitiveSelected::ConicalFrustrum => {} PrimitiveSelected::ConicalFrustum => {}
PrimitiveSelected::Torus => {} PrimitiveSelected::Torus => {}
} }
} }
@ -474,7 +474,7 @@ fn spawn_primitive_2d(
Some(CAPSULE_2D.mesh().build()), Some(CAPSULE_2D.mesh().build()),
None, // cylinder None, // cylinder
None, // cone None, // cone
None, // conical frustrum None, // conical frustum
None, // torus None, // torus
] ]
.into_iter() .into_iter()
@ -520,7 +520,7 @@ fn spawn_primitive_3d(
Some(CAPSULE_3D.mesh().build()), Some(CAPSULE_3D.mesh().build()),
Some(CYLINDER.mesh().build()), Some(CYLINDER.mesh().build()),
None, // cone None, // cone
None, // conical frustrum None, // conical frustum
Some(TORUS.mesh().build()), Some(TORUS.mesh().build()),
] ]
.into_iter() .into_iter()
@ -648,8 +648,8 @@ fn draw_gizmos_3d(mut gizmos: Gizmos, state: Res<State<PrimitiveSelected>>, time
.primitive_3d(CONE, POSITION, rotation, color) .primitive_3d(CONE, POSITION, rotation, color)
.segments(segments), .segments(segments),
), ),
PrimitiveSelected::ConicalFrustrum => { PrimitiveSelected::ConicalFrustum => {
gizmos.primitive_3d(CONICAL_FRUSTRUM, POSITION, rotation, color); gizmos.primitive_3d(CONICAL_FRUSTUM, POSITION, rotation, color);
} }
PrimitiveSelected::Torus => drop( PrimitiveSelected::Torus => drop(