Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/bevy_asset/src/asset_changed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ pub struct AssetChangedState<A: AsAssetId> {
}

#[expect(unsafe_code, reason = "WorldQuery is an unsafe trait.")]
/// SAFETY: `ROQueryFetch<Self>` is the same as `QueryFetch<Self>`
// SAFETY: `ROQueryFetch<Self>` is the same as `QueryFetch<Self>`
unsafe impl<A: AsAssetId> WorldQuery for AssetChanged<A> {
type Fetch<'w> = AssetChangedFetch<'w, A>;

Expand Down Expand Up @@ -264,7 +264,7 @@ unsafe impl<A: AsAssetId> WorldQuery for AssetChanged<A> {
}

#[expect(unsafe_code, reason = "QueryFilter is an unsafe trait.")]
/// SAFETY: read-only access
// SAFETY: read-only access
unsafe impl<A: AsAssetId> QueryFilter for AssetChanged<A> {
const IS_ARCHETYPAL: bool = false;

Expand Down
6 changes: 3 additions & 3 deletions crates/bevy_ecs/macros/src/query_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ pub fn derive_query_data_impl(input: TokenStream) -> TokenStream {
let data_impl = {
let read_only_data_impl = if attributes.is_mutable {
quote! {
/// SAFETY: we assert fields are readonly below
// SAFETY: we assert fields are readonly below
unsafe impl #user_impl_generics #path::query::QueryData
for #read_only_struct_name #user_ty_generics #user_where_clauses {
const IS_READ_ONLY: bool = true;
Expand Down Expand Up @@ -300,7 +300,7 @@ pub fn derive_query_data_impl(input: TokenStream) -> TokenStream {
let is_read_only = !attributes.is_mutable;

quote! {
/// SAFETY: we assert fields are readonly below
// SAFETY: we assert fields are readonly below
unsafe impl #user_impl_generics #path::query::QueryData
for #struct_name #user_ty_generics #user_where_clauses {
const IS_READ_ONLY: bool = #is_read_only;
Expand Down Expand Up @@ -369,7 +369,7 @@ pub fn derive_query_data_impl(input: TokenStream) -> TokenStream {
};

let read_only_data_impl = quote! {
/// SAFETY: we assert fields are readonly below
// SAFETY: we assert fields are readonly below
unsafe impl #user_impl_generics #path::query::ReadOnlyQueryData
for #read_only_struct_name #user_ty_generics #user_where_clauses {}
};
Expand Down
Loading