@@ -10,6 +10,7 @@ use bevy::{
10
10
utils:: HashMap ,
11
11
} ;
12
12
use core:: alloc:: Layout ;
13
+ use core:: panic:: Location ;
13
14
14
15
/// This component is mutable, the default case. This is indicated by components
15
16
/// implementing [`Component`] where [`Component::Mutability`] is [`Mutable`](bevy::ecs::component::Mutable).
@@ -73,7 +74,12 @@ impl NameIndex {
73
74
///
74
75
/// Since all mutations to [`Name`] are captured by hooks, we know it is not currently
75
76
/// inserted in the index, and its value will not change without triggering a hook.
76
- fn on_insert_name ( mut world : DeferredWorld < ' _ > , entity : Entity , _component : ComponentId ) {
77
+ fn on_insert_name (
78
+ mut world : DeferredWorld < ' _ > ,
79
+ entity : Entity ,
80
+ _component : ComponentId ,
81
+ _caller : Option < & ' static Location < ' static > > ,
82
+ ) {
77
83
let Some ( & name) = world. entity ( entity) . get :: < Name > ( ) else {
78
84
unreachable ! ( "OnInsert hook guarantees `Name` is available on entity" )
79
85
} ;
@@ -88,7 +94,12 @@ fn on_insert_name(mut world: DeferredWorld<'_>, entity: Entity, _component: Comp
88
94
///
89
95
/// Since all mutations to [`Name`] are captured by hooks, we know it is currently
90
96
/// inserted in the index.
91
- fn on_replace_name ( mut world : DeferredWorld < ' _ > , entity : Entity , _component : ComponentId ) {
97
+ fn on_replace_name (
98
+ mut world : DeferredWorld < ' _ > ,
99
+ entity : Entity ,
100
+ _component : ComponentId ,
101
+ _caller : Option < & ' static Location < ' static > > ,
102
+ ) {
92
103
let Some ( & name) = world. entity ( entity) . get :: < Name > ( ) else {
93
104
unreachable ! ( "OnReplace hook guarantees `Name` is available on entity" )
94
105
} ;
0 commit comments