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

Use static_assertions to check for trait impls #11407

Merged
merged 4 commits into from
Jan 18, 2024

Conversation

BD103
Copy link
Member

@BD103 BD103 commented Jan 18, 2024

Objective

Solution

  • Add static_assertions and replace current tests.

I wasn't sure whether to remove the existing test or not. What do you think?

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Let's keep the other tests for now: these seem useful enough. We could split them out further, but I won't block on it.

@alice-i-cecile alice-i-cecile added C-Code-Quality A section of code that is hard to understand or change A-Reflection Runtime information about types labels Jan 18, 2024
@BD103 BD103 changed the title Static assert Use static_assertions to check for trait impls Jan 18, 2024
@BD103
Copy link
Member Author

BD103 commented Jan 18, 2024

Awesome! I'll remove the TODO comments.

I'm going to check if any other crates use the same should_impl test style, and I'll fix CI too.

@alice-i-cecile
Copy link
Member

@cBournhonesque, have time for a quick review?

@BD103
Copy link
Member Author

BD103 commented Jan 18, 2024

I couldn't find any other tests that would work for this. As long as CI passes, I think this is ready to merge. :)

@matiqo15 matiqo15 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jan 18, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jan 18, 2024
Merged via the queue into bevyengine:main with commit 056b006 Jan 18, 2024
27 checks passed
@BD103 BD103 deleted the static-assert branch January 18, 2024 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Reflection Runtime information about types C-Code-Quality A section of code that is hard to understand or change S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use static_assertions crate for asserting that types impl Reflect
5 participants