Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support system closures #6

Open
musjj opened this issue Jan 27, 2024 · 0 comments
Open

Support system closures #6

musjj opened this issue Jan 27, 2024 · 0 comments

Comments

@musjj
Copy link

musjj commented Jan 27, 2024

Occasionally, you need to create system closures that can fail. For example, when creating pointer callbacks in bevy_mod_picking:

On::<Pointer<Click>>::run(
    |event: Listener<Pointer<Click>>,
      ...|
     -> anyhow::Result<()> {
        ...
        Ok(())
    }
)

Maybe a macro syntax can be used for this:

sysfail!(|...| -> anyhow::Result<()> { ... })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant