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

Remove Into<&[u8]> bound from IntoByteSlice? #1260

Closed
Tracked by #671
joshlf opened this issue May 14, 2024 · 0 comments · Fixed by #1299
Closed
Tracked by #671

Remove Into<&[u8]> bound from IntoByteSlice? #1260

joshlf opened this issue May 14, 2024 · 0 comments · Fixed by #1299

Comments

@joshlf
Copy link
Member

joshlf commented May 14, 2024

The Into<&[u8]> bound on IntoByteSlice means that we can't implement IntoByteSlice for &mut [u8]. If instead we used a method directly on IntoByteSlice, we could remove this restriction.

This restriction means, for example, that Ref::into_ref isn't available for Ref<&mut [u8], _>.

@joshlf joshlf mentioned this issue May 14, 2024
87 tasks
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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant