diff options
| author | Alice Ryhl <[email protected]> | 2025-05-02 13:19:33 +0000 |
|---|---|---|
| committer | Danilo Krummrich <[email protected]> | 2025-05-07 16:39:39 +0000 |
| commit | 9f140894e72735f034fdc0e963d0550ef03c6f44 (patch) | |
| tree | 9f33028f39182e54e328160dc764c842ba63de1f /scripts/rustdoc_test_builder.rs | |
| parent | rust: alloc: add Vec::drain_all (diff) | |
| download | kernel-9f140894e72735f034fdc0e963d0550ef03c6f44.tar.gz kernel-9f140894e72735f034fdc0e963d0550ef03c6f44.zip | |
rust: alloc: add Vec::retain
This adds a common Vec method called `retain` that removes all elements
that don't match a certain condition. Rust Binder uses it to find all
processes that match a given pid.
The stdlib retain method takes &T rather than &mut T and has a separate
retain_mut for the &mut T case. However, this is considered an API
mistake that can't be fixed now due to backwards compatibility. There's
no reason for us to repeat that mistake.
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]
Signed-off-by: Danilo Krummrich <[email protected]>
Diffstat (limited to 'scripts/rustdoc_test_builder.rs')
0 files changed, 0 insertions, 0 deletions
