@@ -592,12 +592,13 @@ impl World {
592
592
}
593
593
}
594
594
595
- /// Inserts a new resource with default values.
595
+ /// Inserts a new resource with standard starting values.
596
596
///
597
597
/// If the resource already exists, nothing happens.
598
598
///
599
- /// Uses the [`FromWorld`] trait to determine values,
600
- /// which has a blanket impl for all `R: Default`.
599
+ /// The value given by the [`FromWorld::from_world`] method will be used.
600
+ /// Note that any resource with the `Default` trait automatically implements `FromWorld`,
601
+ /// and those default values will be here instead.
601
602
#[ inline]
602
603
pub fn init_resource < R : Resource + FromWorld > ( & mut self ) {
603
604
// PERF: We could avoid double hashing here, since the `from_resources` call is guaranteed
@@ -621,12 +622,13 @@ impl World {
621
622
unsafe { self . insert_resource_with_id ( component_id, value) } ;
622
623
}
623
624
624
- /// Inserts a new non-send resource with default values.
625
+ /// Inserts a new non-send resource with standard starting values.
625
626
///
626
627
/// If the resource already exists, nothing happens.
627
628
///
628
- /// Uses the [`FromWorld`] trait to determine values,
629
- /// which has a blanket impl for all `R: Default`.
629
+ /// The value given by the [`FromWorld::from_world`] method will be used.
630
+ /// Note that any resource with the `Default` trait automatically implements `FromWorld`,
631
+ /// and those default values will be here instead.
630
632
#[ inline]
631
633
pub fn init_non_send_resource < R : ' static + FromWorld > ( & mut self ) {
632
634
// PERF: We could avoid double hashing here, since the `from_resources` call is guaranteed
0 commit comments