Skip to content

Implement <Unalign as TryFromBytes>::is_bit_valid#903

Merged
joshlf merged 1 commit intomainfrom
unalign-try-from-bytes
Feb 17, 2024
Merged

Implement <Unalign as TryFromBytes>::is_bit_valid#903
joshlf merged 1 commit intomainfrom
unalign-try-from-bytes

Conversation

@joshlf
Copy link
Copy Markdown
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 requested a review from jswrenn February 17, 2024 22:43
@joshlf joshlf enabled auto-merge February 17, 2024 22:43
@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
@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