Skip to content

Commit cde8da9

Browse files
committed
replace AccessScope with AsAccess
1 parent 3a02471 commit cde8da9

16 files changed

Lines changed: 394 additions & 494 deletions

File tree

crates/bevy_ecs/src/entity/clone_entities.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ impl EntityCloner {
635635
// - `component` is from `source_entity`'s archetype
636636
let source_component_ptr = unsafe {
637637
source_entity
638-
.get_by_id(&All, component)
638+
.get_by_id(All, component)
639639
.debug_checked_unwrap()
640640
};
641641

crates/bevy_ecs/src/observer/runner.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pub(super) unsafe fn observer_system_runner<E: Event, B: Bundle, S: ObserverSyst
4646
// SAFETY: Observer was triggered so must have an `Observer`
4747
let mut state = unsafe {
4848
observer_cell
49-
.get_mut::<Observer>(&All)
49+
.get_mut::<Observer>(All)
5050
.debug_checked_unwrap()
5151
};
5252

crates/bevy_ecs/src/reflect/component.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ impl<C: Component + Reflect + TypePath> FromType<C> for ReflectComponent {
383383
// SAFETY: reflect_unchecked_mut is an unsafe function pointer used by
384384
// `reflect_unchecked_mut` which must be called with an UnsafeEntityCell with access to the component `C` on the `entity`
385385
// guard ensures `C` is a mutable component
386-
let c = unsafe { entity.get_mut_assume_mutable::<C>(&All) };
386+
let c = unsafe { entity.get_mut_assume_mutable::<C>(All) };
387387
c.map(|c| c.map_unchanged(|value| value as &mut dyn Reflect))
388388
},
389389
register_component: |world: &mut World| -> ComponentId {

crates/bevy_ecs/src/world/entity_access/access_scope.rs

Lines changed: 0 additions & 260 deletions
This file was deleted.

crates/bevy_ecs/src/world/entity_access/all.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ impl<'w> EntityRef<'w, All> {
88
/// all components.
99
pub fn into_filtered(self) -> FilteredEntityRef<'w, 'static> {
1010
// SAFETY:
11-
// - `Access:new_read_all` equals the read permissions of `self`'s `All` scope.
11+
// - `Access:new_read_all` equals the read permissions of `self`'s `All` access.
1212
unsafe { EntityRef::new(self.cell, Filtered(const { &Access::new_read_all() })) }
1313
}
1414

@@ -54,7 +54,7 @@ impl<'w> EntityMut<'w, All> {
5454
#[inline]
5555
pub fn into_filtered(self) -> FilteredEntityMut<'w, 'static> {
5656
// SAFETY:
57-
// - `Access::new_write_all` equals the read and write permissions of `entity`'s `All` scope.
57+
// - `Access::new_write_all` equals the read and write permissions of `entity`'s `All` access.
5858
// - Consuming `self` ensures there are no other accesses.
5959
unsafe { EntityMut::new(self.cell, Filtered(const { &Access::new_write_all() })) }
6060
}

0 commit comments

Comments
 (0)