generalize Align4::as_slice for any Sized type with appropriate alignment#207
Merged
Lokathor merged 5 commits intorust-console:mainfrom Feb 17, 2025
Merged
generalize Align4::as_slice for any Sized type with appropriate alignment#207Lokathor merged 5 commits intorust-console:mainfrom
Lokathor merged 5 commits intorust-console:mainfrom
Conversation
Member
|
This looks reasonable, but now that the math is getting more complex, could you add some various tests for this? |
Contributor
Author
|
should i add a test harness to the project in the first place too? or just add another example |
Member
|
oh, frik, right, we don't have tests in this crate. yeah, an example use that just makes sure all these methods get called once or something would be good. |
165cdef to
2aabc60
Compare
Contributor
Author
|
it felt more right to do a unit test, so i added a test harness after all (#212) |
Member
|
Uh, i think there's a typo where a comma is missing, so the test doesn't parse |
8e10f74 to
6f3bef7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
also move the assertions to compile-time because we know what we need to know by then