mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
remove repetitive code (#12270)
Signed-off-by: geekvest <cuimoman@sohu.com>
This commit is contained in:
parent
13cbb9cf10
commit
d5c32bdc23
9 changed files with 11 additions and 11 deletions
|
@ -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".
|
||||
///
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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>()
|
||||
),
|
||||
}
|
||||
|
|
|
@ -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>()
|
||||
),
|
||||
}
|
||||
|
@ -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>()
|
||||
),
|
||||
}
|
||||
|
|
|
@ -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>()
|
||||
),
|
||||
}
|
||||
|
@ -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>()
|
||||
),
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue