-
Notifications
You must be signed in to change notification settings - Fork 105
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
Remove Into<&[u8]>
bound from IntoByteSlice
?
#1260
Comments
joshlf
added a commit
that referenced
this issue
May 18, 2024
Remove the `Into<&[u8]>` and `Into<&mut [u8]>` bounds on `IntoByteSlice` and `IntoByteSliceMut` and replace them with methods. This allows `IntoByteSlice` to be implemented for `&mut [u8]` (and, as a consequence, permits `Ref::<&mut [u8], _>::into_ref`), which was previously barred. Closes #1260
joshlf
added a commit
that referenced
this issue
May 18, 2024
Remove the `Into<&[u8]>` and `Into<&mut [u8]>` bounds on `IntoByteSlice` and `IntoByteSliceMut` and replace them with methods. This allows `IntoByteSlice` to be implemented for `&mut [u8]` (and, as a consequence, permits `Ref::<&mut [u8], _>::into_ref`), which was previously barred. Closes #1260
joshlf
added a commit
that referenced
this issue
May 18, 2024
Remove the `Into<&[u8]>` and `Into<&mut [u8]>` bounds on `IntoByteSlice` and `IntoByteSliceMut` and replace them with methods. This allows `IntoByteSlice` to be implemented for `&mut [u8]` (and, as a consequence, permits `Ref::<&mut [u8], _>::into_ref`), which was previously barred. Closes #1260
github-merge-queue bot
pushed a commit
that referenced
this issue
May 18, 2024
Remove the `Into<&[u8]>` and `Into<&mut [u8]>` bounds on `IntoByteSlice` and `IntoByteSliceMut` and replace them with methods. This allows `IntoByteSlice` to be implemented for `&mut [u8]` (and, as a consequence, permits `Ref::<&mut [u8], _>::into_ref`), which was previously barred. Closes #1260
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
Into<&[u8]>
bound onIntoByteSlice
means that we can't implementIntoByteSlice
for&mut [u8]
. If instead we used a method directly onIntoByteSlice
, we could remove this restriction.This restriction means, for example, that
Ref::into_ref
isn't available forRef<&mut [u8], _>
.The text was updated successfully, but these errors were encountered: