summaryrefslogtreecommitdiff
path: root/scripts/generate_rust_analyzer.py
diff options
context:
space:
mode:
authorAlice Ryhl <aliceryhl@google.com>2025-05-02 13:19:33 +0000
committerDanilo Krummrich <dakr@kernel.org>2025-05-07 18:39:39 +0200
commit9f140894e72735f034fdc0e963d0550ef03c6f44 (patch)
tree9f33028f39182e54e328160dc764c842ba63de1f /scripts/generate_rust_analyzer.py
parent088bf14a886e1e746c961a862ebccbb76d7cbd4e (diff)
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 <aliceryhl@google.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Benno Lossin <lossin@kernel.org> Link: https://lore.kernel.org/r/20250502-vec-methods-v5-5-06d20ad9366f@google.com Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions