@@ -571,7 +571,7 @@ unsafe impl<'w> Fetch<'w> for EntityFetch<'w> {
571
571
/// SAFETY: `ROQueryFetch<Self>` is the same as `QueryFetch<Self>`
572
572
unsafe impl < T : Component > WorldQuery for & T {
573
573
type ReadOnly = Self ;
574
- type State = ReadState < T > ;
574
+ type State = ComponentIdState < T > ;
575
575
576
576
fn shrink < ' wlong : ' wshort , ' wshort > ( item : QueryItem < ' wlong , Self > ) -> QueryItem < ' wshort , Self > {
577
577
item
@@ -580,15 +580,15 @@ unsafe impl<T: Component> WorldQuery for &T {
580
580
581
581
/// The [`FetchState`] of `&T`.
582
582
#[ doc( hidden) ]
583
- pub struct ReadState < T > {
583
+ pub struct ComponentIdState < T > {
584
584
component_id : ComponentId ,
585
585
marker : PhantomData < T > ,
586
586
}
587
587
588
- impl < T : Component > FetchState for ReadState < T > {
588
+ impl < T : Component > FetchState for ComponentIdState < T > {
589
589
fn init ( world : & mut World ) -> Self {
590
590
let component_id = world. init_component :: < T > ( ) ;
591
- ReadState {
591
+ ComponentIdState {
592
592
component_id,
593
593
marker : PhantomData ,
594
594
}
@@ -626,14 +626,14 @@ unsafe impl<T: Component> ReadOnlyWorldQuery for &T {}
626
626
627
627
impl < ' w , T : Component > WorldQueryGats < ' w > for & T {
628
628
type Fetch = ReadFetch < ' w , T > ;
629
- type _State = ReadState < T > ;
629
+ type _State = ComponentIdState < T > ;
630
630
}
631
631
632
632
// SAFETY: component access and archetype component access are properly updated to reflect that T is
633
633
// read
634
634
unsafe impl < ' w , T : Component > Fetch < ' w > for ReadFetch < ' w , T > {
635
635
type Item = & ' w T ;
636
- type State = ReadState < T > ;
636
+ type State = ComponentIdState < T > ;
637
637
638
638
const IS_DENSE : bool = {
639
639
match T :: Storage :: STORAGE_TYPE {
@@ -646,7 +646,7 @@ unsafe impl<'w, T: Component> Fetch<'w> for ReadFetch<'w, T> {
646
646
647
647
unsafe fn init (
648
648
world : & ' w World ,
649
- state : & ReadState < T > ,
649
+ state : & ComponentIdState < T > ,
650
650
_last_change_tick : u32 ,
651
651
_change_tick : u32 ,
652
652
) -> ReadFetch < ' w , T > {
@@ -752,7 +752,7 @@ unsafe impl<'w, T: Component> Fetch<'w> for ReadFetch<'w, T> {
752
752
/// SAFETY: access of `&T` is a subset of `&mut T`
753
753
unsafe impl < ' w , T : Component > WorldQuery for & ' w mut T {
754
754
type ReadOnly = & ' w T ;
755
- type State = ReadState < T > ;
755
+ type State = ComponentIdState < T > ;
756
756
757
757
fn shrink < ' wlong : ' wshort , ' wshort > ( item : QueryItem < ' wlong , Self > ) -> QueryItem < ' wshort , Self > {
758
758
item
@@ -790,14 +790,14 @@ impl<T> Clone for WriteFetch<'_, T> {
790
790
791
791
impl < ' w , T : Component > WorldQueryGats < ' w > for & mut T {
792
792
type Fetch = WriteFetch < ' w , T > ;
793
- type _State = ReadState < T > ;
793
+ type _State = ComponentIdState < T > ;
794
794
}
795
795
796
796
/// SAFETY: component access and archetype component access are properly updated to reflect that T is
797
797
/// read and write
798
798
unsafe impl < ' w , T : Component > Fetch < ' w > for WriteFetch < ' w , T > {
799
799
type Item = Mut < ' w , T > ;
800
- type State = ReadState < T > ;
800
+ type State = ComponentIdState < T > ;
801
801
802
802
const IS_DENSE : bool = {
803
803
match T :: Storage :: STORAGE_TYPE {
@@ -810,7 +810,7 @@ unsafe impl<'w, T: Component> Fetch<'w> for WriteFetch<'w, T> {
810
810
811
811
unsafe fn init (
812
812
world : & ' w World ,
813
- state : & ReadState < T > ,
813
+ state : & ComponentIdState < T > ,
814
814
last_change_tick : u32 ,
815
815
change_tick : u32 ,
816
816
) -> Self {
0 commit comments