Skip to content

Commit ea0fc1a

Browse files
fix clippy
1 parent b52858e commit ea0fc1a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

crates/bevy_ecs/src/storage/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ impl Storages {
6363
location: EntityLocation,
6464
) -> Option<(Ptr<'_>, &UnsafeCell<ComponentTicks>)> {
6565
let archetype = &archetypes[location.archetype_id];
66+
// SAFETY: component_id is valid as per safety requirements
6667
let component_info = unsafe { components.get_info_unchecked(component_id) };
6768
match component_info.storage_type() {
6869
StorageType::Table => {
@@ -177,6 +178,7 @@ impl Storages {
177178
location: EntityLocation,
178179
) -> Option<&UnsafeCell<ComponentTicks>> {
179180
let archetype = &archetypes[location.archetype_id];
181+
// SAFETY: component_id is valid as per safety requirements
180182
let component_info = unsafe { components.get_info_unchecked(component_id) };
181183
match component_info.storage_type() {
182184
StorageType::Table => {

crates/bevy_ecs/src/world/entity_ref.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -800,11 +800,11 @@ fn sorted_remove<T: Eq + Ord + Copy>(source: &mut Vec<T>, remove: &[T]) {
800800

801801
// SAFETY: EntityLocation must be valid
802802
#[inline]
803-
pub(crate) unsafe fn get_mut<'w, T: Component>(
804-
world: &'w mut World,
803+
pub(crate) unsafe fn get_mut<T: Component>(
804+
world: &mut World,
805805
entity: Entity,
806806
location: EntityLocation,
807-
) -> Option<Mut<'w, T>> {
807+
) -> Option<Mut<'_, T>> {
808808
let change_tick = world.change_tick();
809809
let last_change_tick = world.last_change_tick();
810810
// SAFETY:

0 commit comments

Comments
 (0)