]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: transmute: simplify code with Rust 1.80.0 `split_at_*checked()`
authorMiguel Ojeda <ojeda@kernel.org>
Sun, 5 Apr 2026 23:52:49 +0000 (01:52 +0200)
committerMiguel Ojeda <ojeda@kernel.org>
Tue, 7 Apr 2026 08:00:24 +0000 (10:00 +0200)
commitf309a6edda535f9a8da4f0620d4c45628465d04e
tree2feaa45d77900ea5057368945d48bbeeeec09283
parentd1aa40daa777c74439eebf8aed17392e23685768
rust: transmute: simplify code with Rust 1.80.0 `split_at_*checked()`

`feature(split_at_checked)` [1] has been stabilized in Rust 1.80.0 [2],
which is older than our new minimum Rust version (Rust 1.85.0).

Thus simplify the code using `split_at_*checked()`.

Link: https://github.com/rust-lang/rust/issues/119128
Link: https://github.com/rust-lang/rust/pull/124678
Reviewed-by: Tamir Duberstein <tamird@kernel.org>
Reviewed-by: Gary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20260405235309.418950-14-ojeda@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
rust/kernel/transmute.rs