From 831616662297b1586506a43fa3eefc75602bc31f Mon Sep 17 00:00:00 2001 From: targrub <62773321+targrub@users.noreply.github.com> Date: Fri, 19 Apr 2024 14:17:31 -0400 Subject: [PATCH] Fix uses of "it's" vs "its". (#13033) Grammar changes only. --- crates/bevy_asset/src/processor/mod.rs | 2 +- crates/bevy_ecs/examples/resources.rs | 2 +- crates/bevy_ecs/src/bundle.rs | 8 ++++---- crates/bevy_ecs/src/component.rs | 8 ++++---- crates/bevy_ecs/src/query/state.rs | 4 ++-- crates/bevy_ecs/src/storage/blob_vec.rs | 2 +- crates/bevy_ecs/src/storage/resource.rs | 2 +- crates/bevy_ecs/src/storage/table.rs | 2 +- crates/bevy_ecs/src/system/query.rs | 2 +- crates/bevy_ecs/src/system/system.rs | 2 +- crates/bevy_ecs/src/world/mod.rs | 4 ++-- crates/bevy_gizmos/src/arcs.rs | 2 +- crates/bevy_input/src/gamepad.rs | 2 +- crates/bevy_math/src/cubic_splines.rs | 2 +- crates/bevy_ptr/README.md | 2 +- crates/bevy_reflect/src/path/access.rs | 2 +- crates/bevy_reflect/src/path/error.rs | 2 +- crates/bevy_reflect/src/type_info.rs | 2 +- crates/bevy_time/src/time.rs | 2 +- crates/bevy_ui/src/geometry.rs | 2 +- crates/bevy_ui/src/node_bundles.rs | 12 ++++++------ crates/bevy_utils/src/parallel_queue.rs | 2 +- crates/bevy_window/src/event.rs | 4 ++-- 23 files changed, 37 insertions(+), 37 deletions(-) diff --git a/crates/bevy_asset/src/processor/mod.rs b/crates/bevy_asset/src/processor/mod.rs index 380b1b2b4fd1a..31452a0f85840 100644 --- a/crates/bevy_asset/src/processor/mod.rs +++ b/crates/bevy_asset/src/processor/mod.rs @@ -408,7 +408,7 @@ impl AssetProcessor { infos.remove(&asset_path).await; } - /// Handles a renamed source asset by moving it's processed results to the new location and updating in-memory paths + metadata. + /// Handles a renamed source asset by moving its processed results to the new location and updating in-memory paths + metadata. /// This will cause direct path dependencies to break. async fn handle_renamed_asset(&self, source: &AssetSource, old: PathBuf, new: PathBuf) { let mut infos = self.data.asset_infos.write().await; diff --git a/crates/bevy_ecs/examples/resources.rs b/crates/bevy_ecs/examples/resources.rs index e8d6a9bc10cce..ff266fdd45234 100644 --- a/crates/bevy_ecs/examples/resources.rs +++ b/crates/bevy_ecs/examples/resources.rs @@ -1,4 +1,4 @@ -//! In this example we add a counter resource and increase it's value in one system, +//! In this example we add a counter resource and increase its value in one system, //! while a different system prints the current count to the console. use bevy_ecs::prelude::*; diff --git a/crates/bevy_ecs/src/bundle.rs b/crates/bevy_ecs/src/bundle.rs index 82d9f521868fc..7ba65e9ba42cd 100644 --- a/crates/bevy_ecs/src/bundle.rs +++ b/crates/bevy_ecs/src/bundle.rs @@ -178,7 +178,7 @@ pub trait DynamicBundle { // SAFETY: // - `Bundle::component_ids` calls `ids` for C's component id (and nothing else) -// - `Bundle::get_components` is called exactly once for C and passes the component's storage type based on it's associated constant. +// - `Bundle::get_components` is called exactly once for C and passes the component's storage type based on its associated constant. // - `Bundle::from_components` calls `func` exactly once for C, which is the exact value returned by `Bundle::component_ids`. unsafe impl Bundle for C { fn component_ids( @@ -990,10 +990,10 @@ impl Bundles { T::component_ids(components, storages, &mut |id| component_ids.push(id)); let id = BundleId(bundle_infos.len()); let bundle_info = - // SAFETY: T::component_id ensures its: - // - info was created + // SAFETY: T::component_id ensures: + // - its info was created // - appropriate storage for it has been initialized. - // - was created in the same order as the components in T + // - it was created in the same order as the components in T unsafe { BundleInfo::new(std::any::type_name::(), components, component_ids, id) }; bundle_infos.push(bundle_info); id diff --git a/crates/bevy_ecs/src/component.rs b/crates/bevy_ecs/src/component.rs index 2c043fe46c324..6b91c432f52bd 100644 --- a/crates/bevy_ecs/src/component.rs +++ b/crates/bevy_ecs/src/component.rs @@ -154,7 +154,7 @@ pub trait Component: Send + Sync + 'static { /// A constant indicating the storage type used for this component. const STORAGE_TYPE: StorageType; - /// Called when registering this component, allowing mutable access to it's [`ComponentHooks`]. + /// Called when registering this component, allowing mutable access to its [`ComponentHooks`]. fn register_component_hooks(_hooks: &mut ComponentHooks) {} } @@ -182,7 +182,7 @@ pub enum StorageType { /// The type used for [`Component`] lifecycle hooks such as `on_add`, `on_insert` or `on_remove` pub type ComponentHook = for<'w> fn(DeferredWorld<'w>, Entity, ComponentId); -/// Lifecycle hooks for a given [`Component`], stored in it's [`ComponentInfo`] +/// Lifecycle hooks for a given [`Component`], stored in its [`ComponentInfo`] #[derive(Debug, Clone, Default)] pub struct ComponentHooks { pub(crate) on_add: Option, @@ -193,7 +193,7 @@ pub struct ComponentHooks { impl ComponentHooks { /// Register a [`ComponentHook`] that will be run when this component is added to an entity. /// An `on_add` hook will always run before `on_insert` hooks. Spawning an entity counts as - /// adding all of it's components. + /// adding all of its components. /// /// Will panic if the component already has an `on_add` hook pub fn on_add(&mut self, hook: ComponentHook) -> &mut Self { @@ -212,7 +212,7 @@ impl ComponentHooks { } /// Register a [`ComponentHook`] that will be run when this component is removed from an entity. - /// Despawning an entity counts as removing all of it's components. + /// Despawning an entity counts as removing all of its components. /// /// Will panic if the component already has an `on_remove` hook pub fn on_remove(&mut self, hook: ComponentHook) -> &mut Self { diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs index 84fd805fa6ca9..47618fb93625c 100644 --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -171,7 +171,7 @@ impl QueryState { /// Creates a new [`QueryState`] but does not populate it with the matched results from the World yet /// - /// `new_archetype` and it's variants must be called on all of the World's archetypes before the + /// `new_archetype` and its variants must be called on all of the World's archetypes before the /// state can return valid query results. fn new_uninitialized(world: &mut World) -> Self { let fetch_state = D::init_state(world); @@ -208,7 +208,7 @@ impl QueryState { } } - /// Creates a new [`QueryState`] from a given [`QueryBuilder`] and inherits it's [`FilteredAccess`]. + /// Creates a new [`QueryState`] from a given [`QueryBuilder`] and inherits its [`FilteredAccess`]. pub fn from_builder(builder: &mut QueryBuilder) -> Self { let mut fetch_state = D::init_state(builder.world_mut()); let filter_state = F::init_state(builder.world_mut()); diff --git a/crates/bevy_ecs/src/storage/blob_vec.rs b/crates/bevy_ecs/src/storage/blob_vec.rs index 0bef0e28df8f1..42bdd3fd4baf8 100644 --- a/crates/bevy_ecs/src/storage/blob_vec.rs +++ b/crates/bevy_ecs/src/storage/blob_vec.rs @@ -165,7 +165,7 @@ impl BlobVec { // - the layout of the ptr was `array_layout(self.item_layout, self.capacity)` // - `item_layout.size() > 0` and `new_capacity > 0`, so the layout size is non-zero // - "new_size, when rounded up to the nearest multiple of layout.align(), must not overflow (i.e., the rounded value must be less than usize::MAX)", - // since the item size is always a multiple of its align, the rounding cannot happen + // since the item size is always a multiple of its alignment, the rounding cannot happen // here and the overflow is handled in `array_layout` unsafe { std::alloc::realloc( diff --git a/crates/bevy_ecs/src/storage/resource.rs b/crates/bevy_ecs/src/storage/resource.rs index d83e96497a145..83e533fe609c4 100644 --- a/crates/bevy_ecs/src/storage/resource.rs +++ b/crates/bevy_ecs/src/storage/resource.rs @@ -298,7 +298,7 @@ impl Resources { self.resources.get_mut(component_id) } - /// Fetches or initializes a new resource and returns back it's underlying column. + /// Fetches or initializes a new resource and returns back its underlying column. /// /// # Panics /// Will panic if `component_id` is not valid for the provided `components` diff --git a/crates/bevy_ecs/src/storage/table.rs b/crates/bevy_ecs/src/storage/table.rs index 3c06b41b91a48..8fc73bb873abb 100644 --- a/crates/bevy_ecs/src/storage/table.rs +++ b/crates/bevy_ecs/src/storage/table.rs @@ -139,7 +139,7 @@ impl TableRow { /// Conceptually, a [`Column`] is very similar to a type-erased `Vec`. /// It also stores the change detection ticks for its components, kept in two separate /// contiguous buffers internally. An element shares its data across these buffers by using the -/// same index (i.e. the entity at row 3 has it's data at index 3 and its change detection ticks at +/// same index (i.e. the entity at row 3 has its data at index 3 and its change detection ticks at /// index 3). A slice to these contiguous blocks of memory can be fetched /// via [`Column::get_data_slice`], [`Column::get_added_ticks_slice`], and /// [`Column::get_changed_ticks_slice`]. diff --git a/crates/bevy_ecs/src/system/query.rs b/crates/bevy_ecs/src/system/query.rs index 96747f89f9929..12cb32204fa0f 100644 --- a/crates/bevy_ecs/src/system/query.rs +++ b/crates/bevy_ecs/src/system/query.rs @@ -1366,7 +1366,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> Query<'w, 's, D, F> { ) -> QueryLens<'_, NewD, NewF> { // SAFETY: // - We have exclusive access to the query - // - `self` has correctly captured it's access + // - `self` has correctly captured its access // - Access is checked to be a subset of the query's access when the state is created. let world = unsafe { self.world.world() }; let state = self.state.transmute_filtered::(world); diff --git a/crates/bevy_ecs/src/system/system.rs b/crates/bevy_ecs/src/system/system.rs index 1896327263ed4..9c67cdce39095 100644 --- a/crates/bevy_ecs/src/system/system.rs +++ b/crates/bevy_ecs/src/system/system.rs @@ -176,7 +176,7 @@ impl Debug for dyn System { /// Trait used to run a system immediately on a [`World`]. /// /// # Warning -/// This function is not an efficient method of running systems and its meant to be used as a utility +/// This function is not an efficient method of running systems and it's meant to be used as a utility /// for testing and/or diagnostics. /// /// Systems called through [`run_system_once`](RunSystemOnce::run_system_once) do not hold onto any state, diff --git a/crates/bevy_ecs/src/world/mod.rs b/crates/bevy_ecs/src/world/mod.rs index ed6781ffe3596..ea52da782287b 100644 --- a/crates/bevy_ecs/src/world/mod.rs +++ b/crates/bevy_ecs/src/world/mod.rs @@ -2227,7 +2227,7 @@ impl World { .resources .iter() .filter_map(|(component_id, data)| { - // SAFETY: If a resource has been initialized, a corresponding ComponentInfo must exist with it's ID. + // SAFETY: If a resource has been initialized, a corresponding ComponentInfo must exist with its ID. let component_info = unsafe { self.components .get_info(component_id) @@ -2308,7 +2308,7 @@ impl World { .resources .iter() .filter_map(|(component_id, data)| { - // SAFETY: If a resource has been initialized, a corresponding ComponentInfo must exist with it's ID. + // SAFETY: If a resource has been initialized, a corresponding ComponentInfo must exist with its ID. let component_info = unsafe { self.components .get_info(component_id) diff --git a/crates/bevy_gizmos/src/arcs.rs b/crates/bevy_gizmos/src/arcs.rs index 0c2835c9fb0b8..39a06d5ff5208 100644 --- a/crates/bevy_gizmos/src/arcs.rs +++ b/crates/bevy_gizmos/src/arcs.rs @@ -128,7 +128,7 @@ impl<'w, 's, T: GizmoConfigGroup> Gizmos<'w, 's, T> { /// # Arguments /// - `angle`: sets how much of a circle circumference is passed, e.g. PI is half a circle. This /// value should be in the range (-2 * PI..=2 * PI) - /// - `radius`: distance between the arc and it's center point + /// - `radius`: distance between the arc and its center point /// - `position`: position of the arcs center point /// - `rotation`: defines orientation of the arc, by default we assume the arc is contained in a /// plane parallel to the XZ plane and the default starting point is (`position + Vec3::X`) diff --git a/crates/bevy_input/src/gamepad.rs b/crates/bevy_input/src/gamepad.rs index ba79a935cad4b..85fb310d15a99 100644 --- a/crates/bevy_input/src/gamepad.rs +++ b/crates/bevy_input/src/gamepad.rs @@ -1249,7 +1249,7 @@ impl From for GamepadEvent { } } -/// Splits the [`GamepadEvent`] event stream into it's component events. +/// Splits the [`GamepadEvent`] event stream into its component events. pub fn gamepad_event_system( mut gamepad_events: EventReader, mut connection_events: EventWriter, diff --git a/crates/bevy_math/src/cubic_splines.rs b/crates/bevy_math/src/cubic_splines.rs index c1da3184f7be8..05707a6e4185b 100644 --- a/crates/bevy_math/src/cubic_splines.rs +++ b/crates/bevy_math/src/cubic_splines.rs @@ -558,7 +558,7 @@ impl RationalGenerator

for CubicNurbs

{ .map(|((points, weights), knots)| { // This is curve segment i. It uses control points P_i, P_i+2, P_i+2 and P_i+3, // It is associated with knot span i+3 (which is the interval between knots i+3 - // and i+4) and it's characteristic matrix uses knots i+1 through i+6 (because + // and i+4) and its characteristic matrix uses knots i+1 through i+6 (because // those define the two knot spans on either side). let span = knots[4] - knots[3]; let coefficient_knots = knots.try_into().expect("Knot windows are of length 6"); diff --git a/crates/bevy_ptr/README.md b/crates/bevy_ptr/README.md index 5d551a1a0e190..2d39eb1f1ccf7 100644 --- a/crates/bevy_ptr/README.md +++ b/crates/bevy_ptr/README.md @@ -83,7 +83,7 @@ all usage patterns. `*mut ()` should only be used to carry the mutability of the as a `Box` that does not allocate on initialization or deallocated when it's dropped, and is in fact used to implement common types like `Box`, `Vec`, etc. -`Shared` is currently available in `core::ptr` on nightly Rust builds. It's the pointer that backs both `Rc` and `Arc`. It's semantics allow for +`Shared` is currently available in `core::ptr` on nightly Rust builds. It's the pointer that backs both `Rc` and `Arc`. Its semantics allow for multiple instances to collectively own the data it points to, and as a result, forbids getting a mutable borrow. `bevy_ptr` does not support these types right now, but may support [polyfills] for these pointer types if the need arises. diff --git a/crates/bevy_reflect/src/path/access.rs b/crates/bevy_reflect/src/path/access.rs index 5bb4b5b099261..ebeeade160808 100644 --- a/crates/bevy_reflect/src/path/access.rs +++ b/crates/bevy_reflect/src/path/access.rs @@ -38,7 +38,7 @@ impl<'a> Access<'a> { /// Converts this into an "owned" value. /// /// If the [`Access`] is of variant [`Field`](Access::Field), - /// the field's [`Cow`] will be converted to it's owned + /// the field's [`Cow`] will be converted to its owned /// counterpart, which doesn't require a reference. pub fn into_owned(self) -> Access<'static> { match self { diff --git a/crates/bevy_reflect/src/path/error.rs b/crates/bevy_reflect/src/path/error.rs index eeb4647ad07ab..2c6a06e772912 100644 --- a/crates/bevy_reflect/src/path/error.rs +++ b/crates/bevy_reflect/src/path/error.rs @@ -69,7 +69,7 @@ impl<'a> AccessError<'a> { } /// If the [`Access`] was created with a parser or an offset was manually provided, - /// returns the offset of the [`Access`] in it's path string. + /// returns the offset of the [`Access`] in its path string. pub const fn offset(&self) -> Option<&usize> { self.offset.as_ref() } diff --git a/crates/bevy_reflect/src/type_info.rs b/crates/bevy_reflect/src/type_info.rs index c5bcd34c714e6..6b61b71fdf14e 100644 --- a/crates/bevy_reflect/src/type_info.rs +++ b/crates/bevy_reflect/src/type_info.rs @@ -178,7 +178,7 @@ impl TypeInfo { /// due to technical reasons (or by definition), but it can also be a purposeful choice. /// /// For example, [`i32`] cannot be broken down any further, so it is represented by a [`ValueInfo`]. -/// And while [`String`] itself is a struct, it's fields are private, so we don't really treat +/// And while [`String`] itself is a struct, its fields are private, so we don't really treat /// it _as_ a struct. It therefore makes more sense to represent it as a [`ValueInfo`]. #[derive(Debug, Clone)] pub struct ValueInfo { diff --git a/crates/bevy_time/src/time.rs b/crates/bevy_time/src/time.rs index 23ac856f8084e..f2bc66863f9a4 100644 --- a/crates/bevy_time/src/time.rs +++ b/crates/bevy_time/src/time.rs @@ -295,7 +295,7 @@ impl Time { /// Returns how much time has advanced since [`startup`](#method.startup), as [`f32`] seconds. /// - /// **Note:** This is a monotonically increasing value. It's precision will degrade over time. + /// **Note:** This is a monotonically increasing value. Its precision will degrade over time. /// If you need an `f32` but that precision loss is unacceptable, /// use [`elapsed_seconds_wrapped`](#method.elapsed_seconds_wrapped). #[inline] diff --git a/crates/bevy_ui/src/geometry.rs b/crates/bevy_ui/src/geometry.rs index b217bfa1b44dc..610fc8fb7a39c 100644 --- a/crates/bevy_ui/src/geometry.rs +++ b/crates/bevy_ui/src/geometry.rs @@ -189,7 +189,7 @@ impl Val { /// Resolves a [`Val`] to its value in logical pixels and returns this as an [`f32`]. /// Returns a [`ValArithmeticError::NonEvaluateable`] if the [`Val`] is impossible to resolve into a concrete value. /// - /// **Note:** If a [`Val::Px`] is resolved, it's inner value is returned unchanged. + /// **Note:** If a [`Val::Px`] is resolved, its inner value is returned unchanged. pub fn resolve(self, parent_size: f32, viewport_size: Vec2) -> Result { match self { Val::Percent(value) => Ok(parent_size * value / 100.0), diff --git a/crates/bevy_ui/src/node_bundles.rs b/crates/bevy_ui/src/node_bundles.rs index 17dddacc87253..89d4ecfced791 100644 --- a/crates/bevy_ui/src/node_bundles.rs +++ b/crates/bevy_ui/src/node_bundles.rs @@ -27,7 +27,7 @@ use bevy_transform::prelude::{GlobalTransform, Transform}; pub struct NodeBundle { /// Describes the logical size of the node pub node: Node, - /// Styles which control the layout (size and position) of the node and it's children + /// Styles which control the layout (size and position) of the node and its children /// In some cases these styles also affect how the node drawn/painted. pub style: Style, /// The background color, which serves as a "fill" for this node @@ -89,7 +89,7 @@ impl Default for NodeBundle { pub struct ImageBundle { /// Describes the logical size of the node pub node: Node, - /// Styles which control the layout (size and position) of the node and it's children + /// Styles which control the layout (size and position) of the node and its children /// In some cases these styles also affect how the node drawn/painted. pub style: Style, /// The calculated size based on the given image @@ -137,7 +137,7 @@ pub struct ImageBundle { pub struct AtlasImageBundle { /// Describes the logical size of the node pub node: Node, - /// Styles which control the layout (size and position) of the node and it's children + /// Styles which control the layout (size and position) of the node and its children /// In some cases these styles also affect how the node drawn/painted. pub style: Style, /// The calculated size based on the given image @@ -180,7 +180,7 @@ pub struct AtlasImageBundle { pub struct TextBundle { /// Describes the logical size of the node pub node: Node, - /// Styles which control the layout (size and position) of the node and it's children + /// Styles which control the layout (size and position) of the node and its children /// In some cases these styles also affect how the node drawn/painted. pub style: Style, /// Contains the text of the node @@ -308,7 +308,7 @@ pub struct ButtonBundle { pub node: Node, /// Marker component that signals this node is a button pub button: Button, - /// Styles which control the layout (size and position) of the node and it's children + /// Styles which control the layout (size and position) of the node and its children /// In some cases these styles also affect how the node drawn/painted. pub style: Style, /// Describes whether and how the button has been interacted with by the input @@ -369,7 +369,7 @@ impl Default for ButtonBundle { pub struct MaterialNodeBundle { /// Describes the logical size of the node pub node: Node, - /// Styles which control the layout (size and position) of the node and it's children + /// Styles which control the layout (size and position) of the node and its children /// In some cases these styles also affect how the node drawn/painted. pub style: Style, /// The [`UiMaterial`] used to render the node. diff --git a/crates/bevy_utils/src/parallel_queue.rs b/crates/bevy_utils/src/parallel_queue.rs index a0e342caff72d..a143c3cf528d3 100644 --- a/crates/bevy_utils/src/parallel_queue.rs +++ b/crates/bevy_utils/src/parallel_queue.rs @@ -24,7 +24,7 @@ impl Parallel { impl Parallel { /// Retrieves the thread-local value for the current thread and runs `f` on it. /// - /// If there is no thread-local value, it will be initialized to it's default. + /// If there is no thread-local value, it will be initialized to its default. pub fn scope(&self, f: impl FnOnce(&mut T) -> R) -> R { let cell = self.locals.get_or_default(); let mut value = cell.take(); diff --git a/crates/bevy_window/src/event.rs b/crates/bevy_window/src/event.rs index bc9fa066d0ed3..385e2d5549778 100644 --- a/crates/bevy_window/src/event.rs +++ b/crates/bevy_window/src/event.rs @@ -278,7 +278,7 @@ pub struct WindowOccluded { reflect(Serialize, Deserialize) )] pub struct WindowScaleFactorChanged { - /// Window that had it's scale factor changed. + /// Window that had its scale factor changed. pub window: Entity, /// The new scale factor. pub scale_factor: f64, @@ -293,7 +293,7 @@ pub struct WindowScaleFactorChanged { reflect(Serialize, Deserialize) )] pub struct WindowBackendScaleFactorChanged { - /// Window that had it's scale factor changed by the backend. + /// Window that had its scale factor changed by the backend. pub window: Entity, /// The new scale factor. pub scale_factor: f64,