Skip to content

Add info about the need for 'static + Send + Sync as a trait restraint for generic resources to the Res and ResMut docs #3085

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

Closed
JonahPlusPlus opened this issue Nov 7, 2021 · 2 comments
Labels
C-Docs An addition or correction to our documentation S-Needs-Design This issue requires design work to think about how it would best be accomplished

Comments

@JonahPlusPlus
Copy link
Contributor

How can Bevy's documentation be improved?

Generic resources (ex: SomeResource<T>) require the trait constraint of 'static + Send + Sync to run, otherwise you'll get an error like method not found.

Res and ResMut lack this little bit of info, making debugging a pain to figure out.

Please add this bit of info to the docs.

@JonahPlusPlus JonahPlusPlus added C-Docs An addition or correction to our documentation S-Needs-Triage This issue needs to be labelled labels Nov 7, 2021
@alice-i-cecile alice-i-cecile added S-Needs-Design This issue requires design work to think about how it would best be accomplished and removed S-Needs-Triage This issue needs to be labelled labels Nov 7, 2021
@alice-i-cecile
Copy link
Member

Seemingly resolved by #1962. We should verify that this fully prevents the creation of malformed resources, and then close this out.

@JonahPlusPlus
Copy link
Contributor Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Docs An addition or correction to our documentation S-Needs-Design This issue requires design work to think about how it would best be accomplished
Projects
None yet
Development

No branches or pull requests

2 participants