mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
rust: rbtree: fix documentation typo in CursorMut peek_next method
commit45f6aed8a8upstream. The peek_next method's doc comment incorrectly stated it accesses the "previous" node when it actually accesses the next node. Fix the documentation to accurately reflect the method's behavior. Fixes:98c14e40e0("rust: rbtree: add cursor") Reviewed-by: Alice Ryhl <aliceryhl@google.com> Signed-off-by: Hang Shu <m18080292938@163.com> Reported-by: Miguel Ojeda <ojeda@kernel.org> Closes: https://github.com/Rust-for-Linux/linux/issues/1205 Cc: stable@vger.kernel.org Reviewed-by: Gary Guo <gary@garyguo.net> Link: https://patch.msgid.link/20251107093921.3379954-1-m18080292938@163.com [ Reworded slightly. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fe9a1a825b
commit
50c66cb080
@@ -835,7 +835,7 @@ impl<'a, K, V> Cursor<'a, K, V> {
|
||||
self.peek(Direction::Prev)
|
||||
}
|
||||
|
||||
/// Access the previous node without moving the cursor.
|
||||
/// Access the next node without moving the cursor.
|
||||
pub fn peek_next(&self) -> Option<(&K, &V)> {
|
||||
self.peek(Direction::Next)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user