@@ -336,19 +336,20 @@ impl World {
336
336
337
337
/// Registers a new [`Resource`] type and returns the [`ComponentId`] created for it.
338
338
///
339
- /// Note that the resource doesn't have a value in world, it's only registered.
340
- /// if you want to insert the [`Resource`] in the [`World`], use [`World::init_resource`] or [`World::insert_resource`] instead.
339
+ /// The [`Resource`] doesn't have a value in the [`World`], it's only registered. If you want
340
+ /// to insert the [`Resource`] in the [`World`], use [`World::init_resource`] or
341
+ /// [`World::insert_resource`] instead.
341
342
pub fn register_resource < R : Resource > ( & mut self ) -> ComponentId {
342
343
self . components . register_resource :: < R > ( )
343
344
}
344
345
345
346
/// Returns the [`ComponentId`] of the given [`Resource`] type `T`.
346
347
///
347
- /// The returned `ComponentId` is specific to the `World` instance
348
- /// it was retrieved from and should not be used with another `World` instance.
348
+ /// The returned [ `ComponentId`] is specific to the [ `World`] instance it was retrieved from
349
+ /// and should not be used with another [ `World`] instance.
349
350
///
350
- /// Returns [`None`] if the `Resource` type has not yet been initialized within
351
- /// the `World` using [`World::register_resource`], [`World::init_resource`] or [`World::insert_resource`].
351
+ /// Returns [`None`] if the [ `Resource`] type has not yet been initialized within the
352
+ /// [ `World`] using [`World::register_resource`], [`World::init_resource`] or [`World::insert_resource`].
352
353
pub fn resource_id < T : Resource > ( & self ) -> Option < ComponentId > {
353
354
self . components . get_resource_id ( TypeId :: of :: < T > ( ) )
354
355
}
0 commit comments