Files
linux/rust/kernel
Josef Ippisch 68ac45aabe rust: debugfs: remove unsafe blocks from traits impl for Vec
The previous implementation used an `unsafe` block to manually cast Vec's
slice to a &[u8] using `core::slice::from_raw_parts`.  Instead, the
implementation can be implemented in safe rust using zerocopy's trait
functions `as_bytes()` and `as_mut_bytes()`, respectively, and making use
of deref coercion to implicitly cast Vec to &[T] as `FromBytes` and
`IntoBytes` automatically are implemented on [T] when they are implemented
on T.

Signed-off-by: Josef Ippisch <josef.ippisch.dev@mailbox.org>
Link: https://patch.msgid.link/20260728-migrate-binarywriter-to-zerocopy-intobytes-v2-2-0a4ec1d3ead4@mailbox.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-31 11:08:29 +02:00
..
2025-11-05 00:05:38 +01:00
2025-07-23 02:05:58 +02:00
2026-04-03 11:57:35 +02:00
2026-07-11 18:09:04 +02:00
2026-05-20 00:47:24 +02:00
2025-09-06 13:27:20 +02:00
2026-06-09 04:13:21 +02:00
2026-07-30 22:50:15 +02:00
2026-05-25 09:40:52 +05:30
2026-01-30 05:47:05 +01:00
2025-08-21 16:58:07 +02:00
2025-12-28 12:43:56 +01:00
2024-11-04 16:21:44 -05:00