Skip to content

Commit 45f6aed

Browse files
HangShuYHojeda
authored andcommitted
rust: rbtree: fix documentation typo in CursorMut peek_next method
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: 98c14e4 ("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: #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>
1 parent 600559b commit 45f6aed

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rust/kernel/rbtree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ impl<'a, K, V> CursorMut<'a, K, V> {
985985
self.peek(Direction::Prev)
986986
}
987987

988-
/// Access the previous node without moving the cursor.
988+
/// Access the next node without moving the cursor.
989989
pub fn peek_next(&self) -> Option<(&K, &V)> {
990990
self.peek(Direction::Next)
991991
}

0 commit comments

Comments
 (0)