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

Implement <Unalign as TryFromBytes>::is_bit_valid #903

Merged
merged 1 commit into from
Feb 17, 2024

Conversation

joshlf
Copy link
Member

@joshlf joshlf commented Feb 17, 2024

This replaces the implicit implementation, which accepted all values as bit-valid, which was unsound.

While we're here, add more test cases to test_impls to test hand-rolled is_bit_valid impls for other types.

Closes #897

This replaces the implicit implementation, which accepted all values as
bit-valid, which was unsound.

While we're here, add more test cases to `test_impls` to test
hand-rolled `is_bit_valid` impls for other types.

Closes #897
@joshlf joshlf added this pull request to the merge queue Feb 17, 2024
Merged via the queue into main with commit d52b2c4 Feb 17, 2024
209 checks passed
@joshlf joshlf deleted the unalign-try-from-bytes branch February 17, 2024 22:56
dorryspears pushed a commit to dorryspears/zerocopy that referenced this pull request Feb 20, 2024
This replaces the implicit implementation, which accepted all values as
bit-valid, which was unsound.

While we're here, add more test cases to `test_impls` to test
hand-rolled `is_bit_valid` impls for other types.

Closes google#897
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

Successfully merging this pull request may close these issues.

Implement TryFromBytes::is_bit_valid for Unalign<T>
2 participants