Fix various typos (#5417)

## Objective

- Fix some typos

## Solution

- Fix em. 
- My favorite was `maxizimed`
This commit is contained in:
Rob Parrett 2022-07-21 20:46:54 +00:00
parent 77894639f8
commit cfee0e882e
25 changed files with 34 additions and 34 deletions

View File

@ -81,7 +81,7 @@ pub struct AssetServerInternal {
/// of the assets it manages and can even reload them from the filesystem with /// of the assets it manages and can even reload them from the filesystem with
/// [`AssetServer::watch_for_changes`]! /// [`AssetServer::watch_for_changes`]!
/// ///
/// The asset server is a _resource_, so in order to accesss it in a system you need a `Res` /// The asset server is a _resource_, so in order to access it in a system you need a `Res`
/// accessor, like this: /// accessor, like this:
/// ///
/// ```rust,no_run /// ```rust,no_run
@ -256,7 +256,7 @@ impl AssetServer {
/// Gets the overall load state of a group of assets from the provided handles. /// Gets the overall load state of a group of assets from the provided handles.
/// ///
/// This method will only return [`LoadState::Loaded`] if all assets in the /// This method will only return [`LoadState::Loaded`] if all assets in the
/// group were loaded succesfully. /// group were loaded successfully.
pub fn get_group_load_state(&self, handles: impl IntoIterator<Item = HandleId>) -> LoadState { pub fn get_group_load_state(&self, handles: impl IntoIterator<Item = HandleId>) -> LoadState {
let mut load_state = LoadState::Loaded; let mut load_state = LoadState::Loaded;
for handle_id in handles { for handle_id in handles {

View File

@ -116,7 +116,7 @@ pub(crate) fn sync_debug_assets<T: Asset + Clone>(
/// Uses the return type of the given loader to register the given handle with the appropriate type /// Uses the return type of the given loader to register the given handle with the appropriate type
/// and load the asset with the given `path` and parent `file_path`. /// and load the asset with the given `path` and parent `file_path`.
/// ///
/// If this feels a bit odd ... thats because it is. This was built to improve the UX of the /// If this feels a bit odd ... that's because it is. This was built to improve the UX of the
/// `load_internal_asset` macro. /// `load_internal_asset` macro.
pub fn register_handle_with_loader<A: Asset>( pub fn register_handle_with_loader<A: Asset>(
_loader: fn(&'static str) -> A, _loader: fn(&'static str) -> A,

View File

@ -12,7 +12,7 @@ use std::{
/// Implementation details: /// Implementation details:
/// ///
/// - `load_path` uses the [AssetManager] to load files. /// - `load_path` uses the [AssetManager] to load files.
/// - `read_directory` always returns an empty itrator. /// - `read_directory` always returns an empty iterator.
/// - `get_metadata` will probably return an error. /// - `get_metadata` will probably return an error.
/// - Watching for changes is not supported. The watcher methods will do nothing. /// - Watching for changes is not supported. The watcher methods will do nothing.
/// ///

View File

@ -57,7 +57,7 @@ impl AssetLoader for AudioLoader {
/// A type implementing this trait can be decoded as a rodio source /// A type implementing this trait can be decoded as a rodio source
pub trait Decodable: Send + Sync + 'static { pub trait Decodable: Send + Sync + 'static {
/// The decoder that can decode the implemeting type /// The decoder that can decode the implementing type
type Decoder: rodio::Source + Send + Sync + Iterator<Item = Self::DecoderItem>; type Decoder: rodio::Source + Send + Sync + Iterator<Item = Self::DecoderItem>;
/// A single value given by the decoder /// A single value given by the decoder
type DecoderItem: rodio::Sample + Send + Sync; type DecoderItem: rodio::Sample + Send + Sync;

View File

@ -50,7 +50,7 @@ pub struct AddBundle {
/// state of the archetype graph. /// state of the archetype graph.
/// ///
/// Note: This type only contains edges the [`World`] has already traversed. /// Note: This type only contains edges the [`World`] has already traversed.
/// If any of functions return `None`, it doesn't mean there is guarenteed /// If any of functions return `None`, it doesn't mean there is guaranteed
/// not to be a result of adding or removing that bundle, but rather that /// not to be a result of adding or removing that bundle, but rather that
/// operation that has moved an entity along that edge has not been performed /// operation that has moved an entity along that edge has not been performed
/// yet. /// yet.

View File

@ -72,7 +72,7 @@ struct EventInstance<E: Event> {
/// This collection is meant to be paired with a system that calls /// This collection is meant to be paired with a system that calls
/// [`Events::update`] exactly once per update/frame. /// [`Events::update`] exactly once per update/frame.
/// ///
/// [`Events::update_system`] is a system that does this, typically intialized automatically using /// [`Events::update_system`] is a system that does this, typically initialized automatically using
/// [`add_event`](https://docs.rs/bevy/*/bevy/app/struct.App.html#method.add_event). /// [`add_event`](https://docs.rs/bevy/*/bevy/app/struct.App.html#method.add_event).
/// [`EventReader`]s are expected to read events from this collection at least once per loop/frame. /// [`EventReader`]s are expected to read events from this collection at least once per loop/frame.
/// Events will persist across a single frame boundary and so ordering of event producers and /// Events will persist across a single frame boundary and so ordering of event producers and
@ -267,7 +267,7 @@ impl<'w, 's, E: Event> EventReader<'w, 's, E> {
/// # Limitations /// # Limitations
/// ///
/// `EventWriter` can only send events of one specific type, which must be known at compile-time. /// `EventWriter` can only send events of one specific type, which must be known at compile-time.
/// This is not a problem most of the time, but you may find a situtation where you cannot know /// This is not a problem most of the time, but you may find a situation where you cannot know
/// ahead of time every kind of event you'll need to send. In this case, you can use the "type-erased event" pattern. /// ahead of time every kind of event you'll need to send. In this case, you can use the "type-erased event" pattern.
/// ///
/// ``` /// ```

View File

@ -153,7 +153,7 @@ impl<T: SparseSetIndex> Access<T> {
/// `with` access. /// `with` access.
/// ///
/// For example consider `Query<Option<&T>>` this only has a `read` of `T` as doing /// For example consider `Query<Option<&T>>` this only has a `read` of `T` as doing
/// otherwise would allow for queriess to be considered disjoint that actually arent: /// otherwise would allow for queries to be considered disjoint that actually aren't:
/// - `Query<(&mut T, Option<&U>)>` read/write `T`, read `U`, with `U` /// - `Query<(&mut T, Option<&U>)>` read/write `T`, read `U`, with `U`
/// - `Query<&mut T, Without<U>>` read/write `T`, without `U` /// - `Query<&mut T, Without<U>>` read/write `T`, without `U`
/// from this we could reasonably conclude that the queries are disjoint but they aren't. /// from this we could reasonably conclude that the queries are disjoint but they aren't.

View File

@ -387,7 +387,7 @@ pub unsafe trait Fetch<'world>: Sized {
const IS_DENSE: bool; const IS_DENSE: bool;
/// Returns true if (and only if) this Fetch relies strictly on archetypes to limit which /// Returns true if (and only if) this Fetch relies strictly on archetypes to limit which
/// components are acessed by the Query. /// components are accessed by the Query.
/// ///
/// This enables optimizations for [`crate::query::QueryIter`] that rely on knowing exactly how /// This enables optimizations for [`crate::query::QueryIter`] that rely on knowing exactly how
/// many elements are being iterated (such as `Iterator::collect()`). /// many elements are being iterated (such as `Iterator::collect()`).

View File

@ -55,7 +55,7 @@ impl<Q: WorldQuery, F: WorldQuery> QueryState<Q, F> {
/// which can be faster. /// which can be faster.
/// ///
/// This doesn't use `NopWorldQuery` as it loses filter functionality, for example /// This doesn't use `NopWorldQuery` as it loses filter functionality, for example
/// `NopWorldQuery<Changed<T>>` is functionally equivelent to `With<T>`. /// `NopWorldQuery<Changed<T>>` is functionally equivalent to `With<T>`.
pub fn as_nop(&self) -> &QueryState<NopWorldQuery<Q>, F> { pub fn as_nop(&self) -> &QueryState<NopWorldQuery<Q>, F> {
// SAFETY: `NopWorldQuery` doesn't have any accesses and defers to // SAFETY: `NopWorldQuery` doesn't have any accesses and defers to
// `Q` for table/archetype matching // `Q` for table/archetype matching

View File

@ -133,7 +133,7 @@ impl Column {
/// - `src_row` must be in bounds for `other` /// - `src_row` must be in bounds for `other`
/// - `dst_row` must be in bounds for `self` /// - `dst_row` must be in bounds for `self`
/// - `other[src_row]` must be initialized to a valid value. /// - `other[src_row]` must be initialized to a valid value.
/// - `self[dst_row]` must not be initalized yet. /// - `self[dst_row]` must not be initialized yet.
#[inline] #[inline]
pub(crate) unsafe fn initialize_from_unchecked( pub(crate) unsafe fn initialize_from_unchecked(
&mut self, &mut self,

View File

@ -277,7 +277,7 @@ impl<In, Out, Sys: System<In = In, Out = Out>> IntoSystem<In, Out, AlreadyWasSys
/// [`System`]s may take an optional input which they require to be passed to them when they /// [`System`]s may take an optional input which they require to be passed to them when they
/// are being [`run`](System::run). For [`FunctionSystems`](FunctionSystem) the input may be marked /// are being [`run`](System::run). For [`FunctionSystems`](FunctionSystem) the input may be marked
/// with this `In` type, but only the first param of a function may be tagged as an input. This also /// with this `In` type, but only the first param of a function may be tagged as an input. This also
/// means a system can only have one or zero input paramaters. /// means a system can only have one or zero input parameters.
/// ///
/// # Examples /// # Examples
/// ///

View File

@ -737,7 +737,7 @@ impl World {
#[inline] #[inline]
/// # Safety /// # Safety
/// Only remove `NonSend` resources from the main thread /// Only remove `NonSend` resources from the main thread
/// as they cannot be sent across theads /// as they cannot be sent across threads
#[allow(unused_unsafe)] #[allow(unused_unsafe)]
pub unsafe fn remove_resource_unchecked<R: 'static>(&mut self) -> Option<R> { pub unsafe fn remove_resource_unchecked<R: 'static>(&mut self) -> Option<R> {
let component_id = self.components.get_resource_id(TypeId::of::<R>())?; let component_id = self.components.get_resource_id(TypeId::of::<R>())?;

View File

@ -22,9 +22,9 @@ pub enum PrepareAssetError<E: Send + Sync + 'static> {
/// After that in the [`RenderStage::Prepare`](crate::RenderStage::Prepare) step the extracted asset /// After that in the [`RenderStage::Prepare`](crate::RenderStage::Prepare) step the extracted asset
/// is transformed into its GPU-representation of type [`RenderAsset::PreparedAsset`]. /// is transformed into its GPU-representation of type [`RenderAsset::PreparedAsset`].
pub trait RenderAsset: Asset { pub trait RenderAsset: Asset {
/// The representation of the the asset in the "render world". /// The representation of the asset in the "render world".
type ExtractedAsset: Send + Sync + 'static; type ExtractedAsset: Send + Sync + 'static;
/// The GPU-representation of the the asset. /// The GPU-representation of the asset.
type PreparedAsset: Send + Sync + 'static; type PreparedAsset: Send + Sync + 'static;
/// Specifies all ECS data required by [`RenderAsset::prepare_asset`]. /// Specifies all ECS data required by [`RenderAsset::prepare_asset`].
/// For convenience use the [`lifetimeless`](bevy_ecs::system::lifetimeless) [`SystemParam`]. /// For convenience use the [`lifetimeless`](bevy_ecs::system::lifetimeless) [`SystemParam`].

View File

@ -17,7 +17,7 @@ use std::{any::TypeId, fmt::Debug, hash::Hash, ops::Range};
/// A draw function which is used to draw a specific [`PhaseItem`]. /// A draw function which is used to draw a specific [`PhaseItem`].
/// ///
/// They are the the general form of drawing items, whereas [`RenderCommands`](RenderCommand) /// They are the general form of drawing items, whereas [`RenderCommands`](RenderCommand)
/// are more modular. /// are more modular.
pub trait Draw<P: PhaseItem>: Send + Sync + 'static { pub trait Draw<P: PhaseItem>: Send + Sync + 'static {
/// Draws the [`PhaseItem`] by issuing draw calls via the [`TrackedRenderPass`]. /// Draws the [`PhaseItem`] by issuing draw calls via the [`TrackedRenderPass`].

View File

@ -175,7 +175,7 @@ impl ImageSettings {
} }
/// A rendering resource for the default image sampler which is set during renderer /// A rendering resource for the default image sampler which is set during renderer
/// intialization. /// initialization.
/// ///
/// The [`ImageSettings`] resource can be set during app initialization to change the default /// The [`ImageSettings`] resource can be set during app initialization to change the default
/// image sampler. /// image sampler.

View File

@ -136,7 +136,7 @@ impl TextAlignment {
horizontal: HorizontalAlign::Center, horizontal: HorizontalAlign::Center,
}; };
/// A [`TextAlignment`] set to the the top-right. /// A [`TextAlignment`] set to the top-right.
pub const TOP_RIGHT: Self = TextAlignment { pub const TOP_RIGHT: Self = TextAlignment {
vertical: VerticalAlign::Top, vertical: VerticalAlign::Top,
horizontal: HorizontalAlign::Right, horizontal: HorizontalAlign::Right,
@ -195,7 +195,7 @@ pub enum HorizontalAlign {
/// Leftmost & rightmost characters are equidistant to the render position.<br/> /// Leftmost & rightmost characters are equidistant to the render position.<br/>
/// Bounds start from the render position and advance equally left & right. /// Bounds start from the render position and advance equally left & right.
Center, Center,
/// Rightmost character is immetiately to the left of the render position.<br/> /// Rightmost character is immediately to the left of the render position.<br/>
/// Bounds start from the render position and advance leftwards. /// Bounds start from the render position and advance leftwards.
Right, Right,
} }

View File

@ -55,8 +55,8 @@ impl FixedTimesteps {
/// A system run criteria that enables systems or stages to run at a fixed timestep between executions. /// A system run criteria that enables systems or stages to run at a fixed timestep between executions.
/// ///
/// This does not guarentee that the time elapsed between executions is exactly the provided /// This does not guarantee that the time elapsed between executions is exactly the provided
/// fixed timestep, but will guarentee that the execution will run multiple times per game tick /// fixed timestep, but will guarantee that the execution will run multiple times per game tick
/// until the number of repetitions is as expected. /// until the number of repetitions is as expected.
/// ///
/// For example, a system with a fixed timestep run criteria of 120 times per second will run /// For example, a system with a fixed timestep run criteria of 120 times per second will run

View File

@ -79,7 +79,7 @@ impl From<Transform> for TransformBundle {
/// Label enum for the systems relating to transform propagation /// Label enum for the systems relating to transform propagation
#[derive(Debug, Hash, PartialEq, Eq, Clone, SystemLabel)] #[derive(Debug, Hash, PartialEq, Eq, Clone, SystemLabel)]
pub enum TransformSystem { pub enum TransformSystem {
/// Propagates changes in transform to childrens' [`GlobalTransform`](crate::components::GlobalTransform) /// Propagates changes in transform to children's [`GlobalTransform`](crate::components::GlobalTransform)
TransformPropagate, TransformPropagate,
} }

View File

@ -86,7 +86,7 @@ pub struct Style {
pub align_content: AlignContent, pub align_content: AlignContent,
/// How items align according to the main axis /// How items align according to the main axis
pub justify_content: JustifyContent, pub justify_content: JustifyContent,
/// The position of the node as descrided by its Rect /// The position of the node as described by its Rect
pub position: UiRect<Val>, pub position: UiRect<Val>,
/// The margin of the node /// The margin of the node
pub margin: UiRect<Val>, pub margin: UiRect<Val>,

View File

@ -2,7 +2,7 @@
/// ///
/// Examples of all of these cursors can be found [here](https://www.w3schools.com/cssref/playit.asp?filename=playcss_cursor). /// Examples of all of these cursors can be found [here](https://www.w3schools.com/cssref/playit.asp?filename=playcss_cursor).
/// This `enum` is simply a copy of a similar `enum` found in [`winit`](https://docs.rs/winit/latest/winit/window/enum.CursorIcon.html). /// This `enum` is simply a copy of a similar `enum` found in [`winit`](https://docs.rs/winit/latest/winit/window/enum.CursorIcon.html).
/// `winit`, in turn, mostly copied cursor types avilable in the browser. /// `winit`, in turn, mostly copied cursor types available in the browser.
#[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)] #[derive(Debug, Hash, PartialEq, Eq, Clone, Copy)]
pub enum CursorIcon { pub enum CursorIcon {
/// The platform-dependent default cursor. /// The platform-dependent default cursor.

View File

@ -245,7 +245,7 @@ pub enum WindowCommand {
SetDecorations { SetDecorations {
decorations: bool, decorations: bool,
}, },
/// Set whether or not the cursor's postition is locked. /// Set whether or not the cursor's position is locked.
SetCursorLockMode { SetCursorLockMode {
locked: bool, locked: bool,
}, },
@ -261,7 +261,7 @@ pub enum WindowCommand {
SetCursorPosition { SetCursorPosition {
position: Vec2, position: Vec2,
}, },
/// Set whether or not the window is maxizimed. /// Set whether or not the window is maximized.
SetMaximized { SetMaximized {
maximized: bool, maximized: bool,
}, },
@ -450,8 +450,8 @@ impl Window {
.push(WindowCommand::SetResizeConstraints { resize_constraints }); .push(WindowCommand::SetResizeConstraints { resize_constraints });
} }
/// Request the OS to resize the window such the the client area matches the /// Request the OS to resize the window such the client area matches the specified
/// specified width and height. /// width and height.
#[allow(clippy::float_cmp)] #[allow(clippy::float_cmp)]
pub fn set_resolution(&mut self, width: f32, height: f32) { pub fn set_resolution(&mut self, width: f32, height: f32) {
if self.requested_width == width && self.requested_height == height { if self.requested_width == width && self.requested_height == height {