Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 98c14e40e07a ("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>

authored by

Hang Shu and committed by
Miguel Ojeda
45f6aed8 600559b9

+1 -1
+1 -1
rust/kernel/rbtree.rs
··· 985 985 self.peek(Direction::Prev) 986 986 } 987 987 988 - /// Access the previous node without moving the cursor. 988 + /// Access the next node without moving the cursor. 989 989 pub fn peek_next(&self) -> Option<(&K, &V)> { 990 990 self.peek(Direction::Next) 991 991 }