Skip to content

Commit 97f2caa

Browse files
authored
Fix #15496 missing doc links (#15542)
# Objective - #15496 introduced documentation with some missing links. ## Solution - Add the missing links and clean up a little.
1 parent e7c6228 commit 97f2caa

File tree

1 file changed

+7
-6
lines changed
  • crates/bevy_ecs/src/world

1 file changed

+7
-6
lines changed

crates/bevy_ecs/src/world/mod.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -336,19 +336,20 @@ impl World {
336336

337337
/// Registers a new [`Resource`] type and returns the [`ComponentId`] created for it.
338338
///
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.
341342
pub fn register_resource<R: Resource>(&mut self) -> ComponentId {
342343
self.components.register_resource::<R>()
343344
}
344345

345346
/// Returns the [`ComponentId`] of the given [`Resource`] type `T`.
346347
///
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.
349350
///
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`].
352353
pub fn resource_id<T: Resource>(&self) -> Option<ComponentId> {
353354
self.components.get_resource_id(TypeId::of::<T>())
354355
}

0 commit comments

Comments
 (0)