Skip to content

Commit e37cc8a

Browse files
fix clippy
1 parent 63a0f41 commit e37cc8a

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
@@ -808,11 +808,11 @@ fn sorted_remove<T: Eq + Ord + Copy>(source: &mut Vec<T>, remove: &[T]) {
808808

809809
// SAFETY: EntityLocation must be valid
810810
#[inline]
811-
pub(crate) unsafe fn get_mut<'w, T: Component>(
812-
world: &'w mut World,
811+
pub(crate) unsafe fn get_mut<T: Component>(
812+
world: &mut World,
813813
entity: Entity,
814814
location: EntityLocation,
815-
) -> Option<Mut<'w, T>> {
815+
) -> Option<Mut<'_, T>> {
816816
let change_tick = world.change_tick();
817817
let last_change_tick = world.last_change_tick();
818818
// SAFETY:

0 commit comments

Comments
 (0)