@@ -818,21 +818,6 @@ impl<'w> EntityMut<'w> {
818
818
}
819
819
}
820
820
821
- /// # Safety
822
- /// `entity_location` must be within bounds of the given archetype and `entity` must exist inside
823
- /// the archetype
824
- #[ inline]
825
- unsafe fn get_component_with_type (
826
- world : & World ,
827
- type_id : TypeId ,
828
- target : Option < Entity > ,
829
- entity : Entity ,
830
- location : EntityLocation ,
831
- ) -> Option < * mut u8 > {
832
- let component_id = world. components . get_component_id ( type_id) ?;
833
- get_component ( world, component_id, target, entity, location)
834
- }
835
-
836
821
/// # Safety
837
822
/// `entity_location` must be within bounds of the given archetype and `entity` must exist inside
838
823
/// the archetype
@@ -862,20 +847,6 @@ unsafe fn get_component(
862
847
}
863
848
}
864
849
865
- /// # Safety
866
- /// Caller must ensure that `relationship_id` is valid
867
- #[ inline]
868
- unsafe fn get_component_and_ticks_with_type (
869
- world : & World ,
870
- type_id : TypeId ,
871
- target : Option < Entity > ,
872
- entity : Entity ,
873
- location : EntityLocation ,
874
- ) -> Option < ( * mut u8 , * mut ComponentTicks ) > {
875
- let component_id = world. components . get_component_id ( type_id) ?;
876
- get_component_and_ticks ( world, component_id, target, entity, location)
877
- }
878
-
879
850
/// # Safety
880
851
/// Caller must ensure that `relationship_id` is valid
881
852
#[ inline]
@@ -971,6 +942,35 @@ fn contains_component_with_type(
971
942
. unwrap_or ( false )
972
943
}
973
944
945
+ /// # Safety
946
+ /// `entity_location` must be within bounds of the given archetype and `entity` must exist inside
947
+ /// the archetype
948
+ #[ inline]
949
+ unsafe fn get_component_with_type (
950
+ world : & World ,
951
+ type_id : TypeId ,
952
+ target : Option < Entity > ,
953
+ entity : Entity ,
954
+ location : EntityLocation ,
955
+ ) -> Option < * mut u8 > {
956
+ let component_id = world. components . get_component_id ( type_id) ?;
957
+ get_component ( world, component_id, target, entity, location)
958
+ }
959
+
960
+ /// # Safety
961
+ /// Caller must ensure that `relationship_id` is valid
962
+ #[ inline]
963
+ unsafe fn get_component_and_ticks_with_type (
964
+ world : & World ,
965
+ type_id : TypeId ,
966
+ target : Option < Entity > ,
967
+ entity : Entity ,
968
+ location : EntityLocation ,
969
+ ) -> Option < ( * mut u8 , * mut ComponentTicks ) > {
970
+ let component_id = world. components . get_component_id ( type_id) ?;
971
+ get_component_and_ticks ( world, component_id, target, entity, location)
972
+ }
973
+
974
974
fn contains_component (
975
975
world : & World ,
976
976
component_id : ComponentId ,
0 commit comments