Skip to content

Commit b7845d9

Browse files
committed
Actualise a comment for the struct for ReadOnlyFetch
1 parent ba68958 commit b7845d9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/bevy_ecs/macros/src/fetch.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ pub fn derive_fetch_impl(input: TokenStream) -> TokenStream {
7373
let struct_read_only_declaration = if has_mutable_attr {
7474
quote! {
7575
// TODO: it would be great to be able to dedup this by just deriving `Fetch` again
76-
// without the `mutable` attribute, but supporting QSelf types is tricky.
76+
// without the `mutable` attribute, but we'd need a way to avoid creating a redundant
77+
// `State` struct.
7778
#read_only_derive_macro_call
7879
struct #struct_name_read_only #impl_generics #where_clause {
7980
#(#field_idents: <<#query_types as #path::query::WorldQuery>::ReadOnlyFetch as #path::query::Fetch<#world_lifetime, #world_lifetime>>::Item,)*

0 commit comments

Comments
 (0)