Skip to content

Commit

Permalink
remove repetitive code (#12270)
Browse files Browse the repository at this point in the history
Signed-off-by: geekvest <[email protected]>
  • Loading branch information
geekvest authored Mar 3, 2024
1 parent 13cbb9c commit d5c32bd
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_asset/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ impl<'a> AssetPath<'a> {

/// Resolves an embedded asset path via concatenation. The result will be an `AssetPath` which
/// is resolved relative to this path. This is similar in operation to `resolve`, except that
/// the the 'file' portion of the base path (that is, any characters after the last '/')
/// the 'file' portion of the base path (that is, any characters after the last '/')
/// is removed before concatenation, in accordance with the behavior specified in
/// IETF RFC 1808 "Relative URIs".
///
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ impl BundleInfo {
&self.component_ids
}

/// Returns an iterator over the the [ID](ComponentId) of each component stored in this bundle.
/// Returns an iterator over the [ID](ComponentId) of each component stored in this bundle.
#[inline]
pub fn iter_components(&self) -> impl Iterator<Item = ComponentId> + '_ {
self.component_ids.iter().cloned()
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/query/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ impl<'w, D: QueryData, F: QueryFilter> QueryBuilder<'w, D, F> {
self
}

/// Returns a reference to the the [`FilteredAccess`] that will be provided to the built [`Query`].
/// Returns a reference to the [`FilteredAccess`] that will be provided to the built [`Query`].
pub fn access(&self) -> &FilteredAccess<ComponentId> {
&self.access
}
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/world/deferred_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ impl<'w> DeferredWorld<'w> {
None => panic!(
"Requested non-send resource {} does not exist in the `World`.
Did you forget to add it using `app.insert_non_send_resource` / `app.init_non_send_resource`?
Non-send resources can also be be added by plugins.",
Non-send resources can also be added by plugins.",
std::any::type_name::<R>()
),
}
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 @@ -1484,7 +1484,7 @@ impl World {
None => panic!(
"Requested non-send resource {} does not exist in the `World`.
Did you forget to add it using `app.insert_non_send_resource` / `app.init_non_send_resource`?
Non-send resources can also be be added by plugins.",
Non-send resources can also be added by plugins.",
std::any::type_name::<R>()
),
}
Expand All @@ -1506,7 +1506,7 @@ impl World {
None => panic!(
"Requested non-send resource {} does not exist in the `World`.
Did you forget to add it using `app.insert_non_send_resource` / `app.init_non_send_resource`?
Non-send resources can also be be added by plugins.",
Non-send resources can also be added by plugins.",
std::any::type_name::<R>()
),
}
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_ecs/src/world/world_cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ impl<'w> WorldCell<'w> {
None => panic!(
"Requested non-send resource {} does not exist in the `World`.
Did you forget to add it using `app.insert_non_send_resource` / `app.init_non_send_resource`?
Non-send resources can also be be added by plugins.",
Non-send resources can also be added by plugins.",
std::any::type_name::<T>()
),
}
Expand Down Expand Up @@ -330,7 +330,7 @@ impl<'w> WorldCell<'w> {
None => panic!(
"Requested non-send resource {} does not exist in the `World`.
Did you forget to add it using `app.insert_non_send_resource` / `app.init_non_send_resource`?
Non-send resources can also be be added by plugins.",
Non-send resources can also be added by plugins.",
std::any::type_name::<T>()
),
}
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_gizmos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//!
//! See the documentation on [Gizmos](crate::gizmos::Gizmos) for more examples.
/// Label for the the render systems handling the
/// System set label for the systems handling the rendering of gizmos.
#[derive(SystemSet, Clone, Debug, Hash, PartialEq, Eq)]
pub enum GizmoRenderSystem {
/// Adds gizmos to the [`Transparent2d`](bevy_core_pipeline::core_2d::Transparent2d) render phase
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_tasks/src/thread_executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl<'task, 'ticker> ThreadExecutorTicker<'task, 'ticker> {
}

/// Synchronously try to tick a task on the executor.
/// Returns false if if does not find a task to tick.
/// Returns false if does not find a task to tick.
pub fn try_tick(&self) -> bool {
self.executor.executor.try_tick()
}
Expand Down
2 changes: 1 addition & 1 deletion examples/time/virtual_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ fn move_real_time_sprites(
for mut transform in sprite_query.iter_mut() {
// move roughly half the screen in a `Real` second
// when the time is scaled the speed is going to change
// and the sprite will stay still the the time is paused
// and the sprite will stay still the time is paused
transform.translation.x = get_sprite_translation_x(time.elapsed_seconds());
}
}
Expand Down

0 comments on commit d5c32bd

Please sign in to comment.