Skip to content

Commit 7a92555

Browse files
committed
Update WorldQueryGats doc with type aliases (bevyengine#5898)
Make API users aware that the type aliases `QueryItem` and `QueryFetch` can be used instead of the more bloated alternative with `WorldQueryGats`. Fixes bevyengine#5842
1 parent bd68ba1 commit 7a92555

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/bevy_ecs/src/query/fetch.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,9 @@ pub unsafe trait WorldQuery: for<'w> WorldQueryGats<'w> {
436436
) -> bool;
437437
}
438438

439-
/// A helper trait for [`WorldQuery`] that works around Rust's lack of Generic Associated Types
439+
/// A helper trait for [`WorldQuery`] that works around Rust's lack of Generic Associated Types.
440+
///
441+
/// **Note**: Consider using the type aliases [`QueryItem`] and [`QueryFetch`] when using `Item` or `Fetch`.
440442
pub trait WorldQueryGats<'world> {
441443
type Item;
442444
type Fetch;

0 commit comments

Comments
 (0)