Update WorldQueryGats doc with type aliases (#5898)

Make API users aware that the type aliases `QueryItem` and `QueryFetch` can be used instead of the more bloated alternative with `WorldQueryGats`.

Fixes #5842
This commit is contained in:
robem 2022-09-06 21:24:40 +00:00
parent bd68ba1c3c
commit 7a92555233

View file

@ -436,7 +436,9 @@ pub unsafe trait WorldQuery: for<'w> WorldQueryGats<'w> {
) -> bool;
}
/// A helper trait for [`WorldQuery`] that works around Rust's lack of Generic Associated Types
/// A helper trait for [`WorldQuery`] that works around Rust's lack of Generic Associated Types.
///
/// **Note**: Consider using the type aliases [`QueryItem`] and [`QueryFetch`] when using `Item` or `Fetch`.
pub trait WorldQueryGats<'world> {
type Item;
type Fetch;