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

Add IntoByteSlice trait, use as bound for into_ref #966

Merged
merged 1 commit into from
Feb 29, 2024
Merged

Conversation

joshlf
Copy link
Member

@joshlf joshlf commented Feb 29, 2024

Add IntoByteSlice and IntoByteSliceMut traits, which extend ByteSlice and ByteSliceMut, adding Into<&[u8]> and Into<&mut [u8]> bounds respectively. Use these new traits as the bounds in the Ref methods into_ref, into_mut, into_slice, and into_mut_slice. This allows us to remove the post-monomorphization error which was originally added to patch the soundness hole in #716 in a backwards-compatible way.

Closes #758

Add `IntoByteSlice` and `IntoByteSliceMut` traits, which extend
`ByteSlice` and `ByteSliceMut`, adding `Into<&[u8]>` and `Into<&mut
[u8]>` bounds respectively. Use these new traits as the bounds in the
`Ref` methods `into_ref`, `into_mut`, `into_slice`, and
`into_mut_slice`. This allows us to remove the post-monomorphization
error which was originally added to patch the soundness hole in #716 in
a backwards-compatible way.

Closes #758
Merged via the queue into main with commit bdf6203 Feb 29, 2024
210 checks passed
@joshlf joshlf deleted the into-ref-fix branch February 29, 2024 16:44
joshlf added a commit that referenced this pull request Mar 2, 2024
We made them obsolete in #966 by making the relevant errors not
expressible in our API instead of using post-monomorphization errors.
github-merge-queue bot pushed a commit that referenced this pull request Mar 2, 2024
We made them obsolete in #966 by making the relevant errors not
expressible in our API instead of using post-monomorphization errors.
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 more complete fix for #716
2 participants