Skip to content

Commit

Permalink
Fix uses of "it's" vs "its". (bevyengine#13033)
Browse files Browse the repository at this point in the history
Grammar changes only.
  • Loading branch information
targrub authored Apr 19, 2024
1 parent 2ad27ee commit 8316166
Show file tree
Hide file tree
Showing 23 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/processor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/examples/resources.rs
Original file line number Diff line number Diff line change
@@ -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::*;
Expand Down
8 changes: 4 additions & 4 deletions crates/bevy_ecs/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<C: Component> Bundle for C {
fn component_ids(
Expand Down Expand Up @@ -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::<T>(), components, component_ids, id) };
bundle_infos.push(bundle_info);
id
Expand Down
8 changes: 4 additions & 4 deletions crates/bevy_ecs/src/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
}

Expand Down Expand Up @@ -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<ComponentHook>,
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_ecs/src/query/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> {

/// 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);
Expand Down Expand Up @@ -208,7 +208,7 @@ impl<D: QueryData, F: QueryFilter> QueryState<D, F> {
}
}

/// 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<D, F>) -> Self {
let mut fetch_state = D::init_state(builder.world_mut());
let filter_state = F::init_state(builder.world_mut());
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/storage/blob_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/storage/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ impl<const SEND: bool> Resources<SEND> {
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`
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 @@ -139,7 +139,7 @@ impl TableRow {
/// Conceptually, a [`Column`] is very similar to a type-erased `Vec<T>`.
/// 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`].
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/system/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<NewD, NewF>(world);
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/system/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ impl<In: 'static, Out: 'static> Debug for dyn System<In = In, Out = Out> {
/// 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,
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_ecs/src/world/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_gizmos/src/arcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_input/src/gamepad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,7 @@ impl From<GamepadAxisChangedEvent> 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<GamepadEvent>,
mut connection_events: EventWriter<GamepadConnectionEvent>,
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_math/src/cubic_splines.rs
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ impl<P: VectorSpace> RationalGenerator<P> for CubicNurbs<P> {
.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");
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ptr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ all usage patterns. `*mut ()` should only be used to carry the mutability of the
as a `Box<T>` that does not allocate on initialization or deallocated when it's dropped, and is in fact used to implement common types like `Box<T>`, `Vec<T>`,
etc.

`Shared<T>` is currently available in `core::ptr` on nightly Rust builds. It's the pointer that backs both `Rc<T>` and `Arc<T>`. It's semantics allow for
`Shared<T>` is currently available in `core::ptr` on nightly Rust builds. It's the pointer that backs both `Rc<T>` and `Arc<T>`. 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.
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_reflect/src/path/access.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<str>`] will be converted to it's owned
/// the field's [`Cow<str>`] will be converted to its owned
/// counterpart, which doesn't require a reference.
pub fn into_owned(self) -> Access<'static> {
match self {
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_reflect/src/path/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_reflect/src/type_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_time/src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ impl<T: Default> Time<T> {

/// 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]
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ui/src/geometry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<f32, ValArithmeticError> {
match self {
Val::Percent(value) => Ok(parent_size * value / 100.0),
Expand Down
12 changes: 6 additions & 6 deletions crates/bevy_ui/src/node_bundles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -369,7 +369,7 @@ impl Default for ButtonBundle {
pub struct MaterialNodeBundle<M: UiMaterial> {
/// 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.
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_utils/src/parallel_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl<T: Send> Parallel<T> {
impl<T: Default + Send> Parallel<T> {
/// 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<R>(&self, f: impl FnOnce(&mut T) -> R) -> R {
let cell = self.locals.get_or_default();
let mut value = cell.take();
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_window/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 8316166

Please sign in to comment.