Skip to content

Commit

Permalink
Fix various typos (bevyengine#5417)
Browse files Browse the repository at this point in the history
## Objective

- Fix some typos

## Solution

- Fix em. 
- My favorite was `maxizimed`
  • Loading branch information
rparrett committed Jul 21, 2022
1 parent 7789463 commit cfee0e8
Show file tree
Hide file tree
Showing 25 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions crates/bevy_asset/src/asset_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub struct AssetServerInternal {
/// of the assets it manages and can even reload them from the filesystem with
/// [`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:
///
/// ```rust,no_run
Expand Down Expand Up @@ -256,7 +256,7 @@ impl AssetServer {
/// 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
/// group were loaded succesfully.
/// group were loaded successfully.
pub fn get_group_load_state(&self, handles: impl IntoIterator<Item = HandleId>) -> LoadState {
let mut load_state = LoadState::Loaded;
for handle_id in handles {
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/debug_asset_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
/// 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.
pub fn register_handle_with_loader<A: Asset>(
_loader: fn(&'static str) -> A,
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/io/android_asset_io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use std::{
/// Implementation details:
///
/// - `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.
/// - Watching for changes is not supported. The watcher methods will do nothing.
///
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_audio/src/audio_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl AssetLoader for AudioLoader {

/// A type implementing this trait can be decoded as a rodio source
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>;
/// A single value given by the decoder
type DecoderItem: rodio::Sample + Send + Sync;
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/archetype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub struct AddBundle {
/// state of the archetype graph.
///
/// 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
/// operation that has moved an entity along that edge has not been performed
/// yet.
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_ecs/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct EventInstance<E: Event> {
/// This collection is meant to be paired with a system that calls
/// [`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).
/// [`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
Expand Down Expand Up @@ -267,7 +267,7 @@ impl<'w, 's, E: Event> EventReader<'w, 's, E> {
/// # Limitations
///
/// `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.
///
/// ```
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/query/access.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ impl<T: SparseSetIndex> Access<T> {
/// `with` access.
///
/// 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, Without<U>>` read/write `T`, without `U`
/// from this we could reasonably conclude that the queries are disjoint but they aren't.
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/query/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ pub unsafe trait Fetch<'world>: Sized {
const IS_DENSE: bool;

/// 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
/// many elements are being iterated (such as `Iterator::collect()`).
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/query/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl<Q: WorldQuery, F: WorldQuery> QueryState<Q, F> {
/// which can be faster.
///
/// 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> {
// SAFETY: `NopWorldQuery` doesn't have any accesses and defers to
// `Q` for table/archetype matching
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/storage/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl Column {
/// - `src_row` must be in bounds for `other`
/// - `dst_row` must be in bounds for `self`
/// - `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]
pub(crate) unsafe fn initialize_from_unchecked(
&mut self,
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/system/function_system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
/// 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
/// means a system can only have one or zero input paramaters.
/// means a system can only have one or zero input parameters.
///
/// # Examples
///
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/world/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ impl World {
#[inline]
/// # Safety
/// 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)]
pub unsafe fn remove_resource_unchecked<R: 'static>(&mut self) -> Option<R> {
let component_id = self.components.get_resource_id(TypeId::of::<R>())?;
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_input/src/touch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ impl Touches {
/// Clears the `just_pressed`, `just_released`, and `just_cancelled` collections.
///
/// This is not clearing the `pressed` collection, because it could incorrectly mark
/// a touch input as not pressed eventhough it is pressed. This could happen if the
/// a touch input as not pressed even though it is pressed. This could happen if the
/// touch input is not moving for a single frame and would therefore be marked as
/// not pressed, because this function is called on every single frame no matter
/// if there was an event or not.
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_render/src/render_asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ pub enum PrepareAssetError<E: Send + Sync + 'static> {
/// After that in the [`RenderStage::Prepare`](crate::RenderStage::Prepare) step the extracted asset
/// is transformed into its GPU-representation of type [`RenderAsset::PreparedAsset`].
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;
/// The GPU-representation of the the asset.
/// The GPU-representation of the asset.
type PreparedAsset: Send + Sync + 'static;
/// Specifies all ECS data required by [`RenderAsset::prepare_asset`].
/// For convenience use the [`lifetimeless`](bevy_ecs::system::lifetimeless) [`SystemParam`].
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_render/src/render_phase/draw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`].
///
/// 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.
pub trait Draw<P: PhaseItem>: Send + Sync + 'static {
/// Draws the [`PhaseItem`] by issuing draw calls via the [`TrackedRenderPass`].
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_render/src/renderer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ pub fn render_system(world: &mut World) {
pub type RenderQueue = Arc<Queue>;

/// The GPU instance is used to initialize the [`RenderQueue`] and [`RenderDevice`],
/// aswell as to create [`WindowSurfaces`](crate::view::window::WindowSurfaces).
/// as well as to create [`WindowSurfaces`](crate::view::window::WindowSurfaces).
pub type RenderInstance = Instance;

/// Initializes the renderer by retrieving and preparing the GPU instance, device and queue
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_render/src/texture/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ impl ImageSettings {
}

/// 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
/// image sampler.
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_text/src/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl TextAlignment {
horizontal: HorizontalAlign::Center,
};

/// A [`TextAlignment`] set to the the top-right.
/// A [`TextAlignment`] set to the top-right.
pub const TOP_RIGHT: Self = TextAlignment {
vertical: VerticalAlign::Top,
horizontal: HorizontalAlign::Right,
Expand Down Expand Up @@ -195,7 +195,7 @@ pub enum HorizontalAlign {
/// Leftmost & rightmost characters are equidistant to the render position.<br/>
/// Bounds start from the render position and advance equally left & right.
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.
Right,
}
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_time/src/fixed_timestep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ impl FixedTimesteps {

/// 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
/// fixed timestep, but will guarentee that the execution will run multiple times per game tick
/// This does not guarantee that the time elapsed between executions is exactly the provided
/// fixed timestep, but will guarantee that the execution will run multiple times per game tick
/// 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
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_transform/src/components/global_transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use bevy_reflect::Reflect;
/// [`transform_propagate_system`](crate::transform_propagate_system).
///
/// This system runs in stage [`CoreStage::PostUpdate`](crate::CoreStage::PostUpdate). If you
/// update the[`Transform`] of an entity in this stage or after, you will notice a 1 frame lag
/// update the [`Transform`] of an entity in this stage or after, you will notice a 1 frame lag
/// before the [`GlobalTransform`] is updated.
#[derive(Component, Debug, PartialEq, Clone, Copy, Reflect)]
#[reflect(Component, PartialEq)]
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_transform/src/components/transform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use std::ops::Mul;
/// [`transform_propagate_system`](crate::transform_propagate_system).
///
/// This system runs in stage [`CoreStage::PostUpdate`](crate::CoreStage::PostUpdate). If you
/// update the[`Transform`] of an entity in this stage or after, you will notice a 1 frame lag
/// update the [`Transform`] of an entity in this stage or after, you will notice a 1 frame lag
/// before the [`GlobalTransform`] is updated.
#[derive(Component, Debug, PartialEq, Clone, Copy, Reflect)]
#[reflect(Component, Default, PartialEq)]
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_transform/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use prelude::{GlobalTransform, Transform};
/// [`transform_propagate_system`].
///
/// This system runs in stage [`CoreStage::PostUpdate`](crate::CoreStage::PostUpdate). If you
/// update the[`Transform`] of an entity in this stage or after, you will notice a 1 frame lag
/// update the [`Transform`] of an entity in this stage or after, you will notice a 1 frame lag
/// before the [`GlobalTransform`] is updated.
#[derive(Bundle, Clone, Copy, Debug, Default)]
pub struct TransformBundle {
Expand Down Expand Up @@ -79,7 +79,7 @@ impl From<Transform> for TransformBundle {
/// Label enum for the systems relating to transform propagation
#[derive(Debug, Hash, PartialEq, Eq, Clone, SystemLabel)]
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,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ui/src/ui_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub struct Style {
pub align_content: AlignContent,
/// How items align according to the main axis
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>,
/// The margin of the node
pub margin: UiRect<Val>,
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_window/src/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
///
/// 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).
/// `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)]
pub enum CursorIcon {
/// The platform-dependent default cursor.
Expand Down
8 changes: 4 additions & 4 deletions crates/bevy_window/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ pub enum WindowCommand {
SetDecorations {
decorations: bool,
},
/// Set whether or not the cursor's postition is locked.
/// Set whether or not the cursor's position is locked.
SetCursorLockMode {
locked: bool,
},
Expand All @@ -261,7 +261,7 @@ pub enum WindowCommand {
SetCursorPosition {
position: Vec2,
},
/// Set whether or not the window is maxizimed.
/// Set whether or not the window is maximized.
SetMaximized {
maximized: bool,
},
Expand Down Expand Up @@ -450,8 +450,8 @@ impl Window {
.push(WindowCommand::SetResizeConstraints { resize_constraints });
}

/// Request the OS to resize the window such the the client area matches the
/// specified width and height.
/// Request the OS to resize the window such the client area matches the specified
/// width and height.
#[allow(clippy::float_cmp)]
pub fn set_resolution(&mut self, width: f32, height: f32) {
if self.requested_width == width && self.requested_height == height {
Expand Down

0 comments on commit cfee0e8

Please sign in to comment.