Skip to content

Commit 315732a

Browse files
committed
>:c
1 parent 048ffa8 commit 315732a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

crates/bevy_ecs/src/query/fetch.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ use std::{cell::UnsafeCell, marker::PhantomData};
143143
/// # bevy_ecs::system::assert_is_system(my_system);
144144
/// ```
145145
///
146-
/// Mutable queries will also have a ReadOnly version derived:
146+
/// Mutable queries will also have a read only version derived:
147147
/// ```rust
148148
/// # use bevy_ecs::prelude::*;
149149
/// use bevy_ecs::query::WorldQuery;
@@ -354,6 +354,13 @@ pub trait WorldQueryGats<'world> {
354354
///
355355
/// Every type that implements [`WorldQuery`] have their associated [`WorldQuery::Fetch`](WorldQueryGats::Fetch) and
356356
/// [`WorldQuery::State`] types that are essential for fetching component data.
357+
///
358+
/// Safety
359+
///
360+
/// Implementor must ensure that [`Fetch::update_component_access`] and
361+
/// [`Fetch::update_archetype_component_access`] exactly reflects the results of
362+
/// [`FetchState::matches_component_set`], [`Fetch::archetype_fetch`], and
363+
/// [`Fetch::table_fetch`].
357364
pub unsafe trait Fetch<'world>: Sized {
358365
type Item;
359366
type State: FetchState;

0 commit comments

Comments
 (0)