Repository: bevyengine/bevy
File: crates/bevy_ecs/src/world/unsafe_world_cell.rs (Rust)

Code before:

    /// Retrieves this world's [`Entities`] collection.
    #[inline]
    pub fn entities(self) -> &'w Entities {
        // SAFETY:
        // - we only access world metadata
        &unsafe { self.world_metadata() }.entities
    }

    /// Retrieves this world's [`Archetypes`] collection.
    #[inline]
    pub fn archetypes(self) -> &'w Archetypes {
        // SAFETY:
        // - we only access world metadata
        &unsafe { self.world_metadata() }.archetypes
    }

    /// Retrieves this world's [`Components`] collection.
    #[inline]
    pub fn components(self) -> &'w Components {
        // SAFETY:
        // - we only access world metadata
        &unsafe { self.world_metadata() }.components
    }

    /// Retrieves this world's collection of [removed components](RemovedComponentEvents).
    pub fn removed_components(self) -> &'w RemovedComponentMessages {
        // SAFETY:
        // - we only access world metadata
        &unsafe { self.world_metadata() }.removed_components
    }

    /// Retrieves this world's [`Observers`] collection.
    pub(crate) fn observers(self) -> &'w Observers {
        // SAFETY:
        // - we only access world metadata
        &unsafe { self.world_metadata() }.observers
    }

    /// Retrieves this world's [`Bundles`] collection.
    #[inline]
    pub fn bundles(self) -> &'w Bundles {
        // SAFETY:
        // - we only access world metadata
        &unsafe { self.world_metadata() }.bundles
    }

    /// Gets the current change tick of this world.
    #[inline]
    pub fn change_tick(self) -> Tick {
        // SAFETY:

Review comment (suggestion):
```suggestion
    /// Retrieves this world's collection of [removed components](RemovedComponentMessages).
```

Code after:

    /// Retrieves this world's [`Entities`] collection.
    #[inline]
    pub fn entities(self) -> &'w Entities {
        // SAFETY:
        // - we only access world metadata
        &unsafe { self.world_metadata() }.entities
    }

    /// Retrieves this world's [`Archetypes`] collection.
    #[inline]
    pub fn archetypes(self) -> &'w Archetypes {
        // SAFETY:
        // - we only access world metadata
        &unsafe { self.world_metadata() }.archetypes
    }

    /// Retrieves this world's [`Components`] collection.
    #[inline]
    pub fn components(self) -> &'w Components {
        // SAFETY:
        // - we only access world metadata
        &unsafe { self.world_metadata() }.components
    }

    /// Retrieves this world's collection of [removed components](RemovedComponentMessages).
    pub fn removed_components(self) -> &'w RemovedComponentMessages {
        // SAFETY:
        // - we only access world metadata
        &unsafe { self.world_metadata() }.removed_components
    }

    /// Retrieves this world's [`Observers`] collection.
    pub(crate) fn observers(self) -> &'w Observers {
        // SAFETY:
        // - we only access world metadata
        &unsafe { self.world_metadata() }.observers
    }

    /// Retrieves this world's [`Bundles`] collection.
    #[inline]
    pub fn bundles(self) -> &'w Bundles {
        // SAFETY:
        // - we only access world metadata
        &unsafe { self.world_metadata() }.bundles
    }

    /// Gets the current change tick of this world.
    #[inline]
    pub fn change_tick(self) -> Tick {
        // SAFETY: