diff --git a/benches/benches/bevy_ecs/world/entity_hash.rs b/benches/benches/bevy_ecs/world/entity_hash.rs index af7987bb02..7e8dfb4a21 100644 --- a/benches/benches/bevy_ecs/world/entity_hash.rs +++ b/benches/benches/bevy_ecs/world/entity_hash.rs @@ -1,4 +1,4 @@ -use bevy_ecs::entity::{hash_set::EntityHashSet, Entity}; +use bevy_ecs::entity::{Entity, EntityHashSet}; use criterion::{BenchmarkId, Criterion, Throughput}; use rand::{Rng, SeedableRng}; use rand_chacha::ChaCha8Rng; diff --git a/crates/bevy_core_pipeline/src/oit/resolve/mod.rs b/crates/bevy_core_pipeline/src/oit/resolve/mod.rs index 95ded7a5c0..7db98650fd 100644 --- a/crates/bevy_core_pipeline/src/oit/resolve/mod.rs +++ b/crates/bevy_core_pipeline/src/oit/resolve/mod.rs @@ -6,7 +6,7 @@ use bevy_app::Plugin; use bevy_asset::{load_internal_asset, weak_handle, Handle}; use bevy_derive::Deref; use bevy_ecs::{ - entity::{hash_map::EntityHashMap, hash_set::EntityHashSet}, + entity::{EntityHashMap, EntityHashSet}, prelude::*, }; use bevy_image::BevyDefault as _; diff --git a/crates/bevy_ecs/src/entity/clone_entities.rs b/crates/bevy_ecs/src/entity/clone_entities.rs index ff3d0a10f4..6f667bdc7c 100644 --- a/crates/bevy_ecs/src/entity/clone_entities.rs +++ b/crates/bevy_ecs/src/entity/clone_entities.rs @@ -844,7 +844,7 @@ mod tests { use super::ComponentCloneCtx; use crate::{ component::{Component, ComponentCloneBehavior, ComponentDescriptor, StorageType}, - entity::{hash_map::EntityHashMap, Entity, EntityCloner, SourceComponent}, + entity::{Entity, EntityCloner, EntityHashMap, SourceComponent}, prelude::{ChildOf, Children, Resource}, reflect::{AppTypeRegistry, ReflectComponent, ReflectFromWorld}, world::{FromWorld, World}, diff --git a/crates/bevy_ecs/src/entity/entity_set.rs b/crates/bevy_ecs/src/entity/entity_set.rs index d93debcbc0..9e1a92d8f1 100644 --- a/crates/bevy_ecs/src/entity/entity_set.rs +++ b/crates/bevy_ecs/src/entity/entity_set.rs @@ -13,7 +13,7 @@ use core::{ option, result, }; -use super::{unique_slice::UniqueEntitySlice, Entity}; +use super::{Entity, UniqueEntitySlice}; use bevy_platform_support::sync::Arc; diff --git a/crates/bevy_ecs/src/entity/map_entities.rs b/crates/bevy_ecs/src/entity/map_entities.rs index 3dc938f678..10da6cc559 100644 --- a/crates/bevy_ecs/src/entity/map_entities.rs +++ b/crates/bevy_ecs/src/entity/map_entities.rs @@ -108,7 +108,7 @@ impl> MapEntities for SmallVec { /// /// ``` /// # use bevy_ecs::entity::{Entity, EntityMapper}; -/// # use bevy_ecs::entity::hash_map::EntityHashMap; +/// # use bevy_ecs::entity::EntityHashMap; /// # /// pub struct SimpleEntityMapper { /// map: EntityHashMap, @@ -281,7 +281,7 @@ impl<'m> SceneEntityMapper<'m> { #[cfg(test)] mod tests { use crate::{ - entity::{hash_map::EntityHashMap, Entity, EntityMapper, SceneEntityMapper}, + entity::{Entity, EntityHashMap, EntityMapper, SceneEntityMapper}, world::World, }; diff --git a/crates/bevy_ecs/src/entity/mod.rs b/crates/bevy_ecs/src/entity/mod.rs index 2756648e94..38cda15eaa 100644 --- a/crates/bevy_ecs/src/entity/mod.rs +++ b/crates/bevy_ecs/src/entity/mod.rs @@ -54,13 +54,23 @@ pub use hash::*; pub mod hash_map; pub mod hash_set; +pub use hash_map::EntityHashMap; +pub use hash_set::EntityHashSet; + pub mod index_map; pub mod index_set; +pub use index_map::EntityIndexMap; +pub use index_set::EntityIndexSet; + pub mod unique_array; pub mod unique_slice; pub mod unique_vec; +pub use unique_array::UniqueEntityArray; +pub use unique_slice::UniqueEntitySlice; +pub use unique_vec::UniqueEntityVec; + use crate::{ archetype::{ArchetypeId, ArchetypeRow}, change_detection::MaybeLocation, diff --git a/crates/bevy_ecs/src/entity/unique_slice.rs b/crates/bevy_ecs/src/entity/unique_slice.rs index df2f1dc6d9..9ce9179a3d 100644 --- a/crates/bevy_ecs/src/entity/unique_slice.rs +++ b/crates/bevy_ecs/src/entity/unique_slice.rs @@ -25,10 +25,9 @@ use alloc::{ use bevy_platform_support::sync::Arc; use super::{ - unique_array::UniqueEntityArray, unique_vec::{self, UniqueEntityVec}, Entity, EntitySet, EntitySetIterator, FromEntitySetIterator, TrustedEntityBorrow, - UniqueEntityIter, + UniqueEntityArray, UniqueEntityIter, }; /// A slice that contains only unique entities. diff --git a/crates/bevy_ecs/src/entity/unique_vec.rs b/crates/bevy_ecs/src/entity/unique_vec.rs index e22c4b0902..061cf820d1 100644 --- a/crates/bevy_ecs/src/entity/unique_vec.rs +++ b/crates/bevy_ecs/src/entity/unique_vec.rs @@ -20,9 +20,9 @@ use alloc::{ use bevy_platform_support::sync::Arc; use super::{ - unique_array::UniqueEntityArray, unique_slice::{self, UniqueEntitySlice}, - Entity, EntitySet, FromEntitySetIterator, TrustedEntityBorrow, UniqueEntityIter, + Entity, EntitySet, FromEntitySetIterator, TrustedEntityBorrow, UniqueEntityArray, + UniqueEntityIter, }; /// A `Vec` that contains only unique entities. diff --git a/crates/bevy_ecs/src/observer/mod.rs b/crates/bevy_ecs/src/observer/mod.rs index 21c4e10697..53e499c652 100644 --- a/crates/bevy_ecs/src/observer/mod.rs +++ b/crates/bevy_ecs/src/observer/mod.rs @@ -11,7 +11,7 @@ use crate::{ archetype::ArchetypeFlags, change_detection::MaybeLocation, component::ComponentId, - entity::hash_map::EntityHashMap, + entity::EntityHashMap, prelude::*, system::IntoObserverSystem, world::{DeferredWorld, *}, diff --git a/crates/bevy_ecs/src/query/par_iter.rs b/crates/bevy_ecs/src/query/par_iter.rs index e0a1a5b2f0..0805774f8c 100644 --- a/crates/bevy_ecs/src/query/par_iter.rs +++ b/crates/bevy_ecs/src/query/par_iter.rs @@ -1,7 +1,7 @@ use crate::{ batching::BatchingStrategy, component::Tick, - entity::{unique_vec::UniqueEntityVec, EntityBorrow, TrustedEntityBorrow}, + entity::{EntityBorrow, TrustedEntityBorrow, UniqueEntityVec}, world::unsafe_world_cell::UnsafeWorldCell, }; @@ -363,7 +363,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter, E: TrustedEntityBorrow + Sync> /// /// ``` /// use bevy_utils::Parallel; - /// use crate::{bevy_ecs::{prelude::{Component, Res, Resource, Entity}, entity::unique_vec::UniqueEntityVec, system::Query}}; + /// use crate::{bevy_ecs::{prelude::{Component, Res, Resource, Entity}, entity::UniqueEntityVec, system::Query}}; /// # use core::slice; /// # use crate::bevy_ecs::entity::UniqueEntityIter; /// # fn some_expensive_operation(_item: &T) -> usize { diff --git a/crates/bevy_ecs/src/query/state.rs b/crates/bevy_ecs/src/query/state.rs index 393971c4ac..922b8d22f5 100644 --- a/crates/bevy_ecs/src/query/state.rs +++ b/crates/bevy_ecs/src/query/state.rs @@ -1,7 +1,7 @@ use crate::{ archetype::{Archetype, ArchetypeComponentId, ArchetypeGeneration, ArchetypeId}, component::{ComponentId, Tick}, - entity::{unique_array::UniqueEntityArray, Entity, EntityBorrow, EntitySet}, + entity::{Entity, EntityBorrow, EntitySet, UniqueEntityArray}, entity_disabling::DefaultQueryFilters, prelude::FromWorld, query::{Access, FilteredAccess, QueryCombinationIter, QueryIter, QueryParIter, WorldQuery}, @@ -11,7 +11,7 @@ use crate::{ }; #[cfg(all(not(target_arch = "wasm32"), feature = "multi_threaded"))] -use crate::entity::{unique_slice::UniqueEntitySlice, TrustedEntityBorrow}; +use crate::entity::{TrustedEntityBorrow, UniqueEntitySlice}; use alloc::vec::Vec; use core::{fmt, ptr}; @@ -1005,7 +1005,7 @@ impl QueryState { /// # Examples /// /// ``` - /// use bevy_ecs::{prelude::*, query::QueryEntityError, entity::{EntitySetIterator, unique_array::UniqueEntityArray, unique_vec::UniqueEntityVec}}; + /// use bevy_ecs::{prelude::*, query::QueryEntityError, entity::{EntitySetIterator, UniqueEntityArray, UniqueEntityVec}}; /// /// #[derive(Component, PartialEq, Debug)] /// struct A(usize); @@ -1100,7 +1100,7 @@ impl QueryState { /// returned instead. /// /// ``` - /// use bevy_ecs::{prelude::*, query::QueryEntityError, entity::{EntitySetIterator, unique_array::UniqueEntityArray, unique_vec::UniqueEntityVec}}; + /// use bevy_ecs::{prelude::*, query::QueryEntityError, entity::{EntitySetIterator, UniqueEntityArray, UniqueEntityVec}}; /// /// #[derive(Component, PartialEq, Debug)] /// struct A(usize); diff --git a/crates/bevy_ecs/src/system/query.rs b/crates/bevy_ecs/src/system/query.rs index 16cc8546d0..629ce2ed50 100644 --- a/crates/bevy_ecs/src/system/query.rs +++ b/crates/bevy_ecs/src/system/query.rs @@ -1,9 +1,7 @@ use crate::{ batching::BatchingStrategy, component::Tick, - entity::{ - unique_array::UniqueEntityArray, Entity, EntityBorrow, EntityDoesNotExistError, EntitySet, - }, + entity::{Entity, EntityBorrow, EntityDoesNotExistError, EntitySet, UniqueEntityArray}, query::{ DebugCheckedUnwrap, NopWorldQuery, QueryCombinationIter, QueryData, QueryEntityError, QueryFilter, QueryIter, QueryManyIter, QueryManyUniqueIter, QueryParIter, QueryParManyIter, @@ -1345,7 +1343,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> Query<'w, 's, D, F> { /// # Examples /// /// ``` - /// use bevy_ecs::{prelude::*, query::QueryEntityError, entity::{EntitySetIterator, unique_array::UniqueEntityArray, unique_vec::UniqueEntityVec}}; + /// use bevy_ecs::{prelude::*, query::QueryEntityError, entity::{EntitySetIterator, UniqueEntityArray, UniqueEntityVec}}; /// /// #[derive(Component, PartialEq, Debug)] /// struct A(usize); @@ -1623,7 +1621,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> Query<'w, 's, D, F> { /// # Examples /// /// ``` - /// use bevy_ecs::{prelude::*, query::QueryEntityError, entity::{EntitySetIterator, unique_array::UniqueEntityArray, unique_vec::UniqueEntityVec}}; + /// use bevy_ecs::{prelude::*, query::QueryEntityError, entity::{EntitySetIterator, UniqueEntityArray, UniqueEntityVec}}; /// /// #[derive(Component, PartialEq, Debug)] /// struct A(usize); diff --git a/crates/bevy_ecs/src/world/deferred_world.rs b/crates/bevy_ecs/src/world/deferred_world.rs index d80f838108..02c12fe6a3 100644 --- a/crates/bevy_ecs/src/world/deferred_world.rs +++ b/crates/bevy_ecs/src/world/deferred_world.rs @@ -233,8 +233,8 @@ impl<'w> DeferredWorld<'w> { /// For examples, see [`DeferredWorld::entity_mut`]. /// /// [`EntityMut`]: crate::world::EntityMut - /// [`&EntityHashSet`]: crate::entity::hash_set::EntityHashSet - /// [`EntityHashMap`]: crate::entity::hash_map::EntityHashMap + /// [`&EntityHashSet`]: crate::entity::EntityHashSet + /// [`EntityHashMap`]: crate::entity::EntityHashMap /// [`Vec`]: alloc::vec::Vec #[inline] pub fn get_entity_mut( @@ -342,7 +342,7 @@ impl<'w> DeferredWorld<'w> { /// ## [`&EntityHashSet`] /// /// ``` - /// # use bevy_ecs::{prelude::*, entity::hash_set::EntityHashSet, world::DeferredWorld}; + /// # use bevy_ecs::{prelude::*, entity::EntityHashSet, world::DeferredWorld}; /// #[derive(Component)] /// struct Position { /// x: f32, @@ -365,8 +365,8 @@ impl<'w> DeferredWorld<'w> { /// ``` /// /// [`EntityMut`]: crate::world::EntityMut - /// [`&EntityHashSet`]: crate::entity::hash_set::EntityHashSet - /// [`EntityHashMap`]: crate::entity::hash_map::EntityHashMap + /// [`&EntityHashSet`]: crate::entity::EntityHashSet + /// [`EntityHashMap`]: crate::entity::EntityHashMap /// [`Vec`]: alloc::vec::Vec #[inline] pub fn entity_mut(&mut self, entities: F) -> F::DeferredMut<'_> { diff --git a/crates/bevy_ecs/src/world/entity_fetch.rs b/crates/bevy_ecs/src/world/entity_fetch.rs index b14e42cf01..8588131563 100644 --- a/crates/bevy_ecs/src/world/entity_fetch.rs +++ b/crates/bevy_ecs/src/world/entity_fetch.rs @@ -2,7 +2,7 @@ use alloc::vec::Vec; use core::mem::MaybeUninit; use crate::{ - entity::{hash_map::EntityHashMap, hash_set::EntityHashSet, Entity, EntityDoesNotExistError}, + entity::{Entity, EntityDoesNotExistError, EntityHashMap, EntityHashSet}, error::Result, world::{ error::EntityMutableFetchError, unsafe_world_cell::UnsafeWorldCell, EntityMut, EntityRef, @@ -39,8 +39,8 @@ impl<'w> EntityFetcher<'w> { /// - Pass an [`Entity`] to receive a single [`EntityRef`]. /// - Pass a slice of [`Entity`]s to receive a [`Vec`]. /// - Pass an array of [`Entity`]s to receive an equally-sized array of [`EntityRef`]s. - /// - Pass a reference to a [`EntityHashSet`](crate::entity::hash_map::EntityHashMap) to receive an - /// [`EntityHashMap`](crate::entity::hash_map::EntityHashMap). + /// - Pass a reference to a [`EntityHashSet`](crate::entity::EntityHashMap) to receive an + /// [`EntityHashMap`](crate::entity::EntityHashMap). /// /// # Errors /// @@ -71,8 +71,8 @@ impl<'w> EntityFetcher<'w> { /// such as adding or removing components, or despawning the entity. /// - Pass a slice of [`Entity`]s to receive a [`Vec`]. /// - Pass an array of [`Entity`]s to receive an equally-sized array of [`EntityMut`]s. - /// - Pass a reference to a [`EntityHashSet`](crate::entity::hash_map::EntityHashMap) to receive an - /// [`EntityHashMap`](crate::entity::hash_map::EntityHashMap). + /// - Pass a reference to a [`EntityHashSet`](crate::entity::EntityHashMap) to receive an + /// [`EntityHashMap`](crate::entity::EntityHashMap). /// # Errors /// /// - Returns [`EntityMutableFetchError::EntityDoesNotExist`] if any of the given `entities` do not exist in the world. diff --git a/crates/bevy_ecs/src/world/mod.rs b/crates/bevy_ecs/src/world/mod.rs index 6edc5186c7..917b5bcbd7 100644 --- a/crates/bevy_ecs/src/world/mod.rs +++ b/crates/bevy_ecs/src/world/mod.rs @@ -689,10 +689,10 @@ impl World { /// } /// ``` /// - /// ## [`EntityHashSet`](crate::entity::hash_map::EntityHashMap) + /// ## [`EntityHashSet`](crate::entity::EntityHashMap) /// /// ``` - /// # use bevy_ecs::{prelude::*, entity::hash_set::EntityHashSet}; + /// # use bevy_ecs::{prelude::*, entity::EntityHashSet}; /// #[derive(Component)] /// struct Position { /// x: f32, @@ -710,7 +710,7 @@ impl World { /// } /// ``` /// - /// [`EntityHashSet`]: crate::entity::hash_set::EntityHashSet + /// [`EntityHashSet`]: crate::entity::EntityHashSet #[inline] #[track_caller] pub fn entity(&self, entities: F) -> F::Ref<'_> { @@ -741,8 +741,8 @@ impl World { /// such as adding or removing components, or despawning the entity. /// - Pass a slice of [`Entity`]s to receive a [`Vec`]. /// - Pass an array of [`Entity`]s to receive an equally-sized array of [`EntityMut`]s. - /// - Pass a reference to a [`EntityHashSet`](crate::entity::hash_map::EntityHashMap) to receive an - /// [`EntityHashMap`](crate::entity::hash_map::EntityHashMap). + /// - Pass a reference to a [`EntityHashSet`](crate::entity::EntityHashMap) to receive an + /// [`EntityHashMap`](crate::entity::EntityHashMap). /// /// In order to perform structural changes on the returned entity reference, /// such as adding or removing components, or despawning the entity, only a @@ -823,10 +823,10 @@ impl World { /// } /// ``` /// - /// ## [`EntityHashSet`](crate::entity::hash_map::EntityHashMap) + /// ## [`EntityHashSet`](crate::entity::EntityHashMap) /// /// ``` - /// # use bevy_ecs::{prelude::*, entity::hash_set::EntityHashSet}; + /// # use bevy_ecs::{prelude::*, entity::EntityHashSet}; /// #[derive(Component)] /// struct Position { /// x: f32, @@ -846,7 +846,7 @@ impl World { /// } /// ``` /// - /// [`EntityHashSet`]: crate::entity::hash_set::EntityHashSet + /// [`EntityHashSet`]: crate::entity::EntityHashSet #[inline] #[track_caller] pub fn entity_mut(&mut self, entities: F) -> F::Mut<'_> { @@ -893,8 +893,8 @@ impl World { /// - Pass an [`Entity`] to receive a single [`EntityRef`]. /// - Pass a slice of [`Entity`]s to receive a [`Vec`]. /// - Pass an array of [`Entity`]s to receive an equally-sized array of [`EntityRef`]s. - /// - Pass a reference to a [`EntityHashSet`](crate::entity::hash_map::EntityHashMap) to receive an - /// [`EntityHashMap`](crate::entity::hash_map::EntityHashMap). + /// - Pass a reference to a [`EntityHashSet`](crate::entity::EntityHashMap) to receive an + /// [`EntityHashMap`](crate::entity::EntityHashMap). /// /// # Errors /// @@ -905,7 +905,7 @@ impl World { /// /// For examples, see [`World::entity`]. /// - /// [`EntityHashSet`]: crate::entity::hash_set::EntityHashSet + /// [`EntityHashSet`]: crate::entity::EntityHashSet #[inline] pub fn get_entity( &self, @@ -927,8 +927,8 @@ impl World { /// such as adding or removing components, or despawning the entity. /// - Pass a slice of [`Entity`]s to receive a [`Vec`]. /// - Pass an array of [`Entity`]s to receive an equally-sized array of [`EntityMut`]s. - /// - Pass a reference to a [`EntityHashSet`](crate::entity::hash_map::EntityHashMap) to receive an - /// [`EntityHashMap`](crate::entity::hash_map::EntityHashMap). + /// - Pass a reference to a [`EntityHashSet`](crate::entity::EntityHashMap) to receive an + /// [`EntityHashMap`](crate::entity::EntityHashMap). /// /// In order to perform structural changes on the returned entity reference, /// such as adding or removing components, or despawning the entity, only a @@ -946,7 +946,7 @@ impl World { /// /// For examples, see [`World::entity_mut`]. /// - /// [`EntityHashSet`]: crate::entity::hash_set::EntityHashSet + /// [`EntityHashSet`]: crate::entity::EntityHashSet #[inline] pub fn get_entity_mut( &mut self, @@ -3763,7 +3763,7 @@ mod tests { use crate::{ change_detection::{DetectChangesMut, MaybeLocation}, component::{ComponentCloneBehavior, ComponentDescriptor, ComponentInfo, StorageType}, - entity::hash_set::EntityHashSet, + entity::EntityHashSet, entity_disabling::{DefaultQueryFilters, Disabled}, ptr::OwningPtr, resource::Resource, diff --git a/crates/bevy_gilrs/src/lib.rs b/crates/bevy_gilrs/src/lib.rs index db939cf3f0..9ff12fa430 100644 --- a/crates/bevy_gilrs/src/lib.rs +++ b/crates/bevy_gilrs/src/lib.rs @@ -21,7 +21,7 @@ use bevy_utils::synccell::SyncCell; use core::cell::RefCell; use bevy_app::{App, Plugin, PostUpdate, PreStartup, PreUpdate}; -use bevy_ecs::entity::hash_map::EntityHashMap; +use bevy_ecs::entity::EntityHashMap; use bevy_ecs::prelude::*; use bevy_input::InputSystem; use bevy_platform_support::collections::HashMap; diff --git a/crates/bevy_gizmos/src/lib.rs b/crates/bevy_gizmos/src/lib.rs old mode 100755 new mode 100644 diff --git a/crates/bevy_gltf/src/loader/mod.rs b/crates/bevy_gltf/src/loader/mod.rs index 3a5cf86607..882626af88 100644 --- a/crates/bevy_gltf/src/loader/mod.rs +++ b/crates/bevy_gltf/src/loader/mod.rs @@ -15,7 +15,7 @@ use bevy_asset::{ use bevy_color::{Color, LinearRgba}; use bevy_core_pipeline::prelude::Camera3d; use bevy_ecs::{ - entity::{hash_map::EntityHashMap, Entity}, + entity::{Entity, EntityHashMap}, hierarchy::ChildSpawner, name::Name, world::World, diff --git a/crates/bevy_input_focus/src/directional_navigation.rs b/crates/bevy_input_focus/src/directional_navigation.rs index f02e523eb3..2f3d647025 100644 --- a/crates/bevy_input_focus/src/directional_navigation.rs +++ b/crates/bevy_input_focus/src/directional_navigation.rs @@ -17,7 +17,7 @@ use bevy_app::prelude::*; use bevy_ecs::{ - entity::{hash_map::EntityHashMap, hash_set::EntityHashSet}, + entity::{EntityHashMap, EntityHashSet}, prelude::*, system::SystemParam, }; diff --git a/crates/bevy_pbr/src/cluster/mod.rs b/crates/bevy_pbr/src/cluster/mod.rs index 5657cd29d3..5f17de13e7 100644 --- a/crates/bevy_pbr/src/cluster/mod.rs +++ b/crates/bevy_pbr/src/cluster/mod.rs @@ -5,7 +5,7 @@ use core::num::NonZero; use bevy_core_pipeline::core_3d::Camera3d; use bevy_ecs::{ component::Component, - entity::{hash_map::EntityHashMap, Entity}, + entity::{Entity, EntityHashMap}, query::{With, Without}, reflect::ReflectComponent, resource::Resource, diff --git a/crates/bevy_pbr/src/components.rs b/crates/bevy_pbr/src/components.rs index d70da7cd95..fca31b3b03 100644 --- a/crates/bevy_pbr/src/components.rs +++ b/crates/bevy_pbr/src/components.rs @@ -1,6 +1,6 @@ use bevy_derive::{Deref, DerefMut}; use bevy_ecs::component::Component; -use bevy_ecs::entity::{hash_map::EntityHashMap, Entity}; +use bevy_ecs::entity::{Entity, EntityHashMap}; use bevy_ecs::reflect::ReflectComponent; use bevy_reflect::{std_traits::ReflectDefault, Reflect}; use bevy_render::sync_world::MainEntity; diff --git a/crates/bevy_pbr/src/decal/clustered.rs b/crates/bevy_pbr/src/decal/clustered.rs index 67de430fe4..bdfe7b8b2b 100644 --- a/crates/bevy_pbr/src/decal/clustered.rs +++ b/crates/bevy_pbr/src/decal/clustered.rs @@ -21,7 +21,7 @@ use bevy_asset::{load_internal_asset, weak_handle, AssetId, Handle}; use bevy_derive::{Deref, DerefMut}; use bevy_ecs::{ component::Component, - entity::{hash_map::EntityHashMap, Entity}, + entity::{Entity, EntityHashMap}, prelude::ReflectComponent, query::With, resource::Resource, diff --git a/crates/bevy_pbr/src/light/mod.rs b/crates/bevy_pbr/src/light/mod.rs index d1b873ef46..cdccfb4121 100644 --- a/crates/bevy_pbr/src/light/mod.rs +++ b/crates/bevy_pbr/src/light/mod.rs @@ -1,7 +1,7 @@ use core::ops::DerefMut; use bevy_ecs::{ - entity::{hash_map::EntityHashMap, hash_set::EntityHashSet}, + entity::{EntityHashMap, EntityHashSet}, prelude::*, }; use bevy_math::{ops, Mat4, Vec3A, Vec4}; diff --git a/crates/bevy_pbr/src/meshlet/instance_manager.rs b/crates/bevy_pbr/src/meshlet/instance_manager.rs index 26f6432a1f..11348c00a5 100644 --- a/crates/bevy_pbr/src/meshlet/instance_manager.rs +++ b/crates/bevy_pbr/src/meshlet/instance_manager.rs @@ -6,7 +6,7 @@ use crate::{ }; use bevy_asset::{AssetEvent, AssetServer, Assets, UntypedAssetId}; use bevy_ecs::{ - entity::{hash_map::EntityHashMap, Entities, Entity}, + entity::{Entities, Entity, EntityHashMap}, event::EventReader, query::Has, resource::Resource, diff --git a/crates/bevy_pbr/src/meshlet/resource_manager.rs b/crates/bevy_pbr/src/meshlet/resource_manager.rs index 9fb1387aec..9b45d7676a 100644 --- a/crates/bevy_pbr/src/meshlet/resource_manager.rs +++ b/crates/bevy_pbr/src/meshlet/resource_manager.rs @@ -8,7 +8,7 @@ use bevy_core_pipeline::{ }; use bevy_ecs::{ component::Component, - entity::{hash_map::EntityHashMap, Entity}, + entity::{Entity, EntityHashMap}, query::AnyOf, resource::Resource, system::{Commands, Query, Res, ResMut}, diff --git a/crates/bevy_pbr/src/render/light.rs b/crates/bevy_pbr/src/render/light.rs index 652ed311e2..eb549bd248 100644 --- a/crates/bevy_pbr/src/render/light.rs +++ b/crates/bevy_pbr/src/render/light.rs @@ -8,7 +8,7 @@ use bevy_derive::{Deref, DerefMut}; use bevy_ecs::component::Tick; use bevy_ecs::system::SystemChangeTick; use bevy_ecs::{ - entity::{hash_map::EntityHashMap, hash_set::EntityHashSet}, + entity::{EntityHashMap, EntityHashSet}, prelude::*, system::lifetimeless::Read, }; diff --git a/crates/bevy_render/src/primitives/mod.rs b/crates/bevy_render/src/primitives/mod.rs index ef67997ecf..ca664fc338 100644 --- a/crates/bevy_render/src/primitives/mod.rs +++ b/crates/bevy_render/src/primitives/mod.rs @@ -1,6 +1,6 @@ use core::borrow::Borrow; -use bevy_ecs::{component::Component, entity::hash_map::EntityHashMap, reflect::ReflectComponent}; +use bevy_ecs::{component::Component, entity::EntityHashMap, reflect::ReflectComponent}; use bevy_math::{Affine3A, Mat3A, Mat4, Vec3, Vec3A, Vec4, Vec4Swizzles}; use bevy_reflect::prelude::*; diff --git a/crates/bevy_render/src/view/visibility/mod.rs b/crates/bevy_render/src/view/visibility/mod.rs index d72c52abf7..e7ce31c5ce 100644 --- a/crates/bevy_render/src/view/visibility/mod.rs +++ b/crates/bevy_render/src/view/visibility/mod.rs @@ -4,7 +4,7 @@ mod render_layers; use core::any::TypeId; use bevy_ecs::component::HookContext; -use bevy_ecs::entity::hash_set::EntityHashSet; +use bevy_ecs::entity::EntityHashSet; use bevy_ecs::world::DeferredWorld; use derive_more::derive::{Deref, DerefMut}; pub use range::*; diff --git a/crates/bevy_render/src/view/visibility/range.rs b/crates/bevy_render/src/view/visibility/range.rs index 5a6728337b..86e75733c5 100644 --- a/crates/bevy_render/src/view/visibility/range.rs +++ b/crates/bevy_render/src/view/visibility/range.rs @@ -9,7 +9,7 @@ use core::{ use bevy_app::{App, Plugin, PostUpdate}; use bevy_ecs::{ component::Component, - entity::{hash_map::EntityHashMap, Entity}, + entity::{Entity, EntityHashMap}, query::{Changed, With}, reflect::ReflectComponent, removal_detection::RemovedComponents, diff --git a/crates/bevy_render/src/view/window/mod.rs b/crates/bevy_render/src/view/window/mod.rs index 622b17bef7..dbf75567af 100644 --- a/crates/bevy_render/src/view/window/mod.rs +++ b/crates/bevy_render/src/view/window/mod.rs @@ -4,7 +4,7 @@ use crate::{ Extract, ExtractSchedule, Render, RenderApp, RenderSet, WgpuWrapper, }; use bevy_app::{App, Plugin}; -use bevy_ecs::{entity::hash_map::EntityHashMap, prelude::*}; +use bevy_ecs::{entity::EntityHashMap, prelude::*}; use bevy_platform_support::collections::HashSet; use bevy_utils::default; use bevy_window::{ diff --git a/crates/bevy_render/src/view/window/screenshot.rs b/crates/bevy_render/src/view/window/screenshot.rs index d8a309036e..eb66343afc 100644 --- a/crates/bevy_render/src/view/window/screenshot.rs +++ b/crates/bevy_render/src/view/window/screenshot.rs @@ -20,7 +20,7 @@ use bevy_app::{First, Plugin, Update}; use bevy_asset::{load_internal_asset, weak_handle, Handle}; use bevy_derive::{Deref, DerefMut}; use bevy_ecs::{ - entity::hash_map::EntityHashMap, event::event_update_system, prelude::*, system::SystemState, + entity::EntityHashMap, event::event_update_system, prelude::*, system::SystemState, }; use bevy_image::{Image, TextureFormatPixelInfo}; use bevy_platform_support::collections::HashSet; diff --git a/crates/bevy_scene/src/dynamic_scene.rs b/crates/bevy_scene/src/dynamic_scene.rs index 02f621ad14..41ce14d3f2 100644 --- a/crates/bevy_scene/src/dynamic_scene.rs +++ b/crates/bevy_scene/src/dynamic_scene.rs @@ -2,7 +2,7 @@ use crate::{DynamicSceneBuilder, Scene, SceneSpawnError}; use bevy_asset::Asset; use bevy_ecs::reflect::{ReflectMapEntities, ReflectResource}; use bevy_ecs::{ - entity::{hash_map::EntityHashMap, Entity, SceneEntityMapper}, + entity::{Entity, EntityHashMap, SceneEntityMapper}, reflect::{AppTypeRegistry, ReflectComponent}, world::World, }; @@ -217,7 +217,7 @@ where mod tests { use bevy_ecs::{ component::Component, - entity::{hash_map::EntityHashMap, Entity, EntityMapper, MapEntities}, + entity::{Entity, EntityHashMap, EntityMapper, MapEntities}, hierarchy::ChildOf, reflect::{AppTypeRegistry, ReflectComponent, ReflectMapEntities, ReflectResource}, resource::Resource, diff --git a/crates/bevy_scene/src/scene.rs b/crates/bevy_scene/src/scene.rs index 104a129f79..1d684c9dac 100644 --- a/crates/bevy_scene/src/scene.rs +++ b/crates/bevy_scene/src/scene.rs @@ -5,7 +5,7 @@ use crate::{DynamicScene, SceneSpawnError}; use bevy_asset::Asset; use bevy_ecs::{ component::ComponentCloneBehavior, - entity::{hash_map::EntityHashMap, Entity, SceneEntityMapper}, + entity::{Entity, EntityHashMap, SceneEntityMapper}, entity_disabling::DefaultQueryFilters, reflect::{AppTypeRegistry, ReflectComponent, ReflectResource}, relationship::RelationshipHookMode, diff --git a/crates/bevy_scene/src/scene_spawner.rs b/crates/bevy_scene/src/scene_spawner.rs index 4acfac93a9..17aedfb803 100644 --- a/crates/bevy_scene/src/scene_spawner.rs +++ b/crates/bevy_scene/src/scene_spawner.rs @@ -1,7 +1,7 @@ use crate::{DynamicScene, Scene}; use bevy_asset::{AssetEvent, AssetId, Assets, Handle}; use bevy_ecs::{ - entity::{hash_map::EntityHashMap, Entity}, + entity::{Entity, EntityHashMap}, event::{Event, EventCursor, Events}, hierarchy::ChildOf, reflect::AppTypeRegistry, diff --git a/crates/bevy_scene/src/serde.rs b/crates/bevy_scene/src/serde.rs index 35b68b85be..526069b5ab 100644 --- a/crates/bevy_scene/src/serde.rs +++ b/crates/bevy_scene/src/serde.rs @@ -515,7 +515,7 @@ mod tests { DynamicScene, DynamicSceneBuilder, }; use bevy_ecs::{ - entity::{hash_map::EntityHashMap, Entity}, + entity::{Entity, EntityHashMap}, prelude::{Component, ReflectComponent, ReflectResource, Resource, World}, query::{With, Without}, reflect::AppTypeRegistry, diff --git a/crates/bevy_text/src/text2d.rs b/crates/bevy_text/src/text2d.rs index ef70a4b9c3..a9419e89c0 100644 --- a/crates/bevy_text/src/text2d.rs +++ b/crates/bevy_text/src/text2d.rs @@ -7,7 +7,7 @@ use crate::{ use bevy_asset::Assets; use bevy_color::LinearRgba; use bevy_derive::{Deref, DerefMut}; -use bevy_ecs::entity::hash_set::EntityHashSet; +use bevy_ecs::entity::EntityHashSet; use bevy_ecs::{ change_detection::{DetectChanges, Ref}, component::Component, diff --git a/crates/bevy_ui/src/layout/ui_surface.rs b/crates/bevy_ui/src/layout/ui_surface.rs index e0333763b8..a9322de53e 100644 --- a/crates/bevy_ui/src/layout/ui_surface.rs +++ b/crates/bevy_ui/src/layout/ui_surface.rs @@ -4,7 +4,7 @@ use bevy_platform_support::collections::hash_map::Entry; use taffy::TaffyTree; use bevy_ecs::{ - entity::{hash_map::EntityHashMap, Entity}, + entity::{Entity, EntityHashMap}, prelude::Resource, }; use bevy_math::{UVec2, Vec2}; diff --git a/crates/bevy_ui/src/update.rs b/crates/bevy_ui/src/update.rs index 67d5947547..bb8752797b 100644 --- a/crates/bevy_ui/src/update.rs +++ b/crates/bevy_ui/src/update.rs @@ -9,7 +9,7 @@ use crate::{ use super::ComputedNode; use bevy_ecs::{ change_detection::DetectChangesMut, - entity::{hash_set::EntityHashSet, Entity}, + entity::{Entity, EntityHashSet}, hierarchy::ChildOf, query::{Changed, With}, system::{Commands, Local, Query, Res}, diff --git a/crates/bevy_winit/src/accessibility.rs b/crates/bevy_winit/src/accessibility.rs index 575971ae18..b03277aeca 100644 --- a/crates/bevy_winit/src/accessibility.rs +++ b/crates/bevy_winit/src/accessibility.rs @@ -16,7 +16,7 @@ use bevy_a11y::{ }; use bevy_app::{App, Plugin, PostUpdate}; use bevy_derive::{Deref, DerefMut}; -use bevy_ecs::{entity::hash_map::EntityHashMap, prelude::*}; +use bevy_ecs::{entity::EntityHashMap, prelude::*}; use bevy_window::{PrimaryWindow, Window, WindowClosed}; /// Maps window entities to their `AccessKit` [`Adapter`]s. diff --git a/crates/bevy_winit/src/winit_windows.rs b/crates/bevy_winit/src/winit_windows.rs index dfb68fbcce..5bb8162132 100644 --- a/crates/bevy_winit/src/winit_windows.rs +++ b/crates/bevy_winit/src/winit_windows.rs @@ -1,7 +1,7 @@ use bevy_a11y::AccessibilityRequested; use bevy_ecs::entity::Entity; -use bevy_ecs::entity::hash_map::EntityHashMap; +use bevy_ecs::entity::EntityHashMap; use bevy_platform_support::collections::HashMap; use bevy_window::{ CursorGrabMode, MonitorSelection, VideoModeSelection, Window, WindowMode, WindowPosition, diff --git a/examples/ecs/relationships.rs b/examples/ecs/relationships.rs index 675cd78c2d..955c1fe35e 100644 --- a/examples/ecs/relationships.rs +++ b/examples/ecs/relationships.rs @@ -11,7 +11,7 @@ //! In this example we're creating a [`Targeting`]/[`TargetedBy`] relationship, //! demonstrating how you might model units which target a single unit in combat. -use bevy::ecs::entity::hash_set::EntityHashSet; +use bevy::ecs::entity::EntityHashSet; use bevy::ecs::system::RunSystemOnce; use bevy::prelude::*; diff --git a/examples/tools/scene_viewer/animation_plugin.rs b/examples/tools/scene_viewer/animation_plugin.rs index b7f36bd72d..33588516c7 100644 --- a/examples/tools/scene_viewer/animation_plugin.rs +++ b/examples/tools/scene_viewer/animation_plugin.rs @@ -1,9 +1,7 @@ //! Control animations of entities in the loaded scene. use std::collections::HashMap; -use bevy::{ - animation::AnimationTarget, ecs::entity::hash_map::EntityHashMap, gltf::Gltf, prelude::*, -}; +use bevy::{animation::AnimationTarget, ecs::entity::EntityHashMap, gltf::Gltf, prelude::*}; use crate::scene_viewer_plugin::SceneHandle;