summaryrefslogtreecommitdiff
path: root/rust/kernel/str.rs
diff options
context:
space:
mode:
authorVitaly Wool <vitaly.wool@konsulko.se>2025-10-14 14:33:39 +0200
committerMiguel Ojeda <ojeda@kernel.org>2025-11-16 21:56:57 +0100
commitf56b131723826dfdbf829d014591d831d649ae4a (patch)
treeb5d65dacadb43306e40412cf474ed3d37fc38e17 /rust/kernel/str.rs
parent5935461b458463ee51aac8d95c25d7a5e1de8c4d (diff)
rust: rbtree: add immutable cursor
Sometimes we may need to iterate over, or find an element in a read only (or read mostly) red-black tree, and in that case we don't need a mutable reference to the tree, which we'll however have to take to be able to use the current (mutable) cursor implementation. This patch adds a simple immutable cursor implementation to RBTree, which enables us to use an immutable tree reference. The existing (fully featured) cursor implementation is renamed to CursorMut, while retaining its functionality. The only existing user of the [mutable] cursor for RBTrees (binder) is updated to match the changes. Signed-off-by: Vitaly Wool <vitaly.wool@konsulko.se> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://patch.msgid.link/20251014123339.2492210-1-vitaly.wool@konsulko.se [ Applied `rustfmt`. Added intra-doc link. Fixed unclosed example. Fixed docs description. Fixed typo and other formatting nits. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel/str.rs')
0 files changed, 0 insertions, 0 deletions