FROMLIST: rust: rbtree: add `RBTreeIterator`
- Add Iterator implementation (`RBTreeIterator`) for `RBTree`, allowing iteration over (key, value) pairs in key order. - Add individual `keys()` and `values()` functions to iterate over keys or values alone. - Update doctests to use iteration instead of explicitly getting items. Iteration is needed by the binder driver to enumerate all values in a tree for oneway spam detection [1]. Link: https://lore.kernel.org/rust-for-linux/20231101-rust-binder-v1-17-08ba9197f637@google.com/ [1] Signed-off-by:Wedson Almeida Filho <wedsonaf@gmail.com> Signed-off-by:
Matt Gilbride <mattgilbride@google.com> Bug: 324206405 Link: https://lore.kernel.org/all/20240205-b4-rbtree-v1-3-995e3eee38c0@google.com/ Change-Id: I29031d6d0d0a4b7d35e015bbca61473193605a12 Signed-off-by:
Alice Ryhl <aliceryhl@google.com>
Loading
Please sign in to comment