mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-05 08:44:14 +02:00
Migrate `BinaryWriter` and `BinaryReaderMut`'s default implementation's requirements on T from `kernel::transmute` traits to `zerocopy` traits. The additional `zerocopy::Immutable` requirement on `BinaryWriter` does not further restrict the types in practice but is rather a more explicit requirement (that the type does not have interior mutability) and is required by zerocopy for the `as_bytes()` function. Suggested-by: Joshua Liebow-Feeser <joshlf@google.com> Suggested-by: Miguel Ojeda <ojeda@kernel.org> Link: https://github.com/Rust-for-Linux/linux/issues/975 Link: https://github.com/Rust-for-Linux/linux/issues/1241 Signed-off-by: Josef Ippisch <josef.ippisch.dev@mailbox.org> Link: https://patch.msgid.link/20260728-migrate-binarywriter-to-zerocopy-intobytes-v2-1-0a4ec1d3ead4@mailbox.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>