commit | e601f1bb8e859758289b1c52503bc626168fba59 | [log] [tgz] |
---|---|---|
author | Wedson Almeida Filho <[email protected]> | Thu Aug 22 16:37:54 2024 +0000 |
committer | Miguel Ojeda <[email protected]> | Sat Aug 31 17:36:19 2024 +0200 |
tree | a1d48f3efd4b9f5af5b64965e461c4edb009a8a6 | |
parent | a0d13aac7022f95ec161c18d18e3d81172666ed8 [diff] |
rust: rbtree: add iterator - Add Iterator implementation 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/[email protected]/ [1] Signed-off-by: Wedson Almeida Filho <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Tested-by: Alice Ryhl <[email protected]> Reviewed-by: Benno Lossin <[email protected]> Reviewed-by: Boqun Feng <[email protected]> Signed-off-by: Matt Gilbride <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>