-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Advocate for Debug
implementation of Res
/ResMut
#2048
Comments
Related to #1130. From what I've gathered, we'd love to be able to support this, but we need to make sure it's painless. This would be particularly useful for the editor. Not everything we wrap in a Res will have As a workaround for now, you should be able to unwrap the |
For what it's worth, we can have blanket I'm not sure there is a way to have a fallback without negative trait bounds and/or specialization. |
I'm mostly advocating for |
I just tested, and having a blanket implementation of Debug for all Res where T implements Debug is certainly possible and seems to work fine. Maybe there are more advanced use cases that this doesn't cover, but I can't really see any downside to having this regardless.
|
Should the I think |
@forbjok I agree, this won't be a complete solution but it certainly seems harmless to include (especially with the suggestion by @mockersf). We'll want to make sure we hit Could we do the same thing for components? I know that we have a |
I made a pull request adding implementations for Res and ResMut. |
This commit adds blanket implementations of Debug for Res and ResMut, as discussed in #2048.
This issue should've been close by #2050 😄 |
This commit adds blanket implementations of Debug for Res and ResMut, as discussed in bevyengine#2048.
I would like to start a small discussion over adding
Debug
forRes
andResMut
.What are the thoughts and ideas around this? I'd gladly start a PR on this, if that's
a welcome idea.
The text was updated successfully, but these errors were encountered: