diff options
| author | Josef Ippisch <josef.ippisch.dev@mailbox.org> | 2026-07-28 19:31:20 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-07-31 11:08:29 +0200 |
| commit | 68ac45aabe603f330f3b9776d6e5ddf573b1fdea (patch) | |
| tree | 1a463ac580f2a52320a0adbc7e34ab8c2123f665 /tools/perf/scripts/python | |
| parent | 6e33dee41d88411be38bcd58f8e85f233721476e (diff) | |
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>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
