diff options
| author | Alice Ryhl <[email protected]> | 2025-05-02 13:19:34 +0000 |
|---|---|---|
| committer | Danilo Krummrich <[email protected]> | 2025-05-07 16:40:02 +0000 |
| commit | 294a7ecbdf0a5d65c6df1287c5d56241e9331cf2 (patch) | |
| tree | f65ebee141e217d34f474106b2c3372c207b0afe /scripts/rustdoc_test_builder.rs | |
| parent | rust: alloc: add Vec::retain (diff) | |
| download | kernel-294a7ecbdf0a5d65c6df1287c5d56241e9331cf2.tar.gz kernel-294a7ecbdf0a5d65c6df1287c5d56241e9331cf2.zip | |
rust: alloc: add Vec::remove
This is needed by Rust Binder in the range allocator, and by upcoming
GPU drivers during firmware initialization.
Panics in the kernel are best avoided when possible, so an error is
returned if the index is out of bounds. An error type is used rather
than just returning Option<T> to let callers handle errors with ?.
Signed-off-by: Alice Ryhl <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Reviewed-by: Benno Lossin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ Remove `# Panics` section; `Vec::remove() handles the error properly.`
- Danilo ]
Signed-off-by: Danilo Krummrich <[email protected]>
Diffstat (limited to 'scripts/rustdoc_test_builder.rs')
0 files changed, 0 insertions, 0 deletions
