Skip to content

Commit

Permalink
fix(flecs_ecs_derive): query,system,observer macro accept &world
Browse files Browse the repository at this point in the history
  • Loading branch information
Indra-db committed Jan 8, 2025
1 parent 02f4c20 commit 5a5d45a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions flecs_ecs_derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1671,7 +1671,7 @@ pub fn query(input: ProcMacroTokenStream) -> ProcMacroTokenStream {
Some(name) => quote! {
{
#doc
#world.query_named::<#iter_type>(#name)
(#world).query_named::<#iter_type>(#name)
#(
#builder_calls
)*
Expand All @@ -1680,7 +1680,7 @@ pub fn query(input: ProcMacroTokenStream) -> ProcMacroTokenStream {
None => quote! {
{
#doc
#world.query::<#iter_type>()
(#world).query::<#iter_type>()
#(
#builder_calls
)*
Expand Down Expand Up @@ -1712,7 +1712,7 @@ pub fn system(input: ProcMacroTokenStream) -> ProcMacroTokenStream {
Some(name) => quote! {
{
#doc
#world.system_named::<#iter_type>(#name)
(#world).system_named::<#iter_type>(#name)
#(
#builder_calls
)*
Expand All @@ -1722,7 +1722,7 @@ pub fn system(input: ProcMacroTokenStream) -> ProcMacroTokenStream {
None => quote! {
{
#doc
#world.system::<#iter_type>()
(#world).system::<#iter_type>()
#(
#builder_calls
)*
Expand Down Expand Up @@ -1786,7 +1786,7 @@ pub fn observer(input: ProcMacroTokenStream) -> ProcMacroTokenStream {
Some(name) => quote! {
{
#doc
#world.observer_named::<#event_type, #iter_type>(#name)
(#world).observer_named::<#event_type, #iter_type>(#name)
#(
#builder_calls
)*
Expand All @@ -1795,7 +1795,7 @@ pub fn observer(input: ProcMacroTokenStream) -> ProcMacroTokenStream {
None => quote! {
{
#doc
#world.observer::<#event_type, #iter_type>()
(#world).observer::<#event_type, #iter_type>()
#(
#builder_calls
)*
Expand Down

0 comments on commit 5a5d45a

Please sign in to comment.