@@ -487,7 +487,7 @@ impl ComponentHooks {
487
487
/// Will panic if the component already has an `on_add` hook
488
488
pub fn on_add ( & mut self , hook : ComponentHook ) -> & mut Self {
489
489
self . try_on_add ( hook)
490
- . expect ( "Component id: {:?}, already has an on_add hook" )
490
+ . expect ( "Component already has an on_add hook" )
491
491
}
492
492
493
493
/// Register a [`ComponentHook`] that will be run when this component is added (with `.insert`)
@@ -505,7 +505,7 @@ impl ComponentHooks {
505
505
/// Will panic if the component already has an `on_insert` hook
506
506
pub fn on_insert ( & mut self , hook : ComponentHook ) -> & mut Self {
507
507
self . try_on_insert ( hook)
508
- . expect ( "Component id: {:?}, already has an on_insert hook" )
508
+ . expect ( "Component already has an on_insert hook" )
509
509
}
510
510
511
511
/// Register a [`ComponentHook`] that will be run when this component is about to be dropped,
@@ -527,7 +527,7 @@ impl ComponentHooks {
527
527
/// Will panic if the component already has an `on_replace` hook
528
528
pub fn on_replace ( & mut self , hook : ComponentHook ) -> & mut Self {
529
529
self . try_on_replace ( hook)
530
- . expect ( "Component id: {:?}, already has an on_replace hook" )
530
+ . expect ( "Component already has an on_replace hook" )
531
531
}
532
532
533
533
/// Register a [`ComponentHook`] that will be run when this component is removed from an entity.
@@ -538,7 +538,7 @@ impl ComponentHooks {
538
538
/// Will panic if the component already has an `on_remove` hook
539
539
pub fn on_remove ( & mut self , hook : ComponentHook ) -> & mut Self {
540
540
self . try_on_remove ( hook)
541
- . expect ( "Component id: {:?}, already has an on_remove hook" )
541
+ . expect ( "Component already has an on_remove hook" )
542
542
}
543
543
544
544
/// Attempt to register a [`ComponentHook`] that will be run when this component is added to an entity.
0 commit comments