Commit 45f6aed8 authored by Hang Shu's avatar Hang Shu Committed by Miguel Ojeda
Browse files

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: 98c14e40 ("rust: rbtree: add cursor")
Reviewed-by: default avatarAlice Ryhl <aliceryhl@google.com>
Signed-off-by: default avatarHang Shu <m18080292938@163.com>
Reported-by: default avatarMiguel Ojeda <ojeda@kernel.org>
Closes: https://github.com/Rust-for-Linux/linux/issues/1205


Cc: stable@vger.kernel.org
Reviewed-by: default avatarGary Guo <gary@garyguo.net>
Link: https://patch.msgid.link/20251107093921.3379954-1-m18080292938@163.com


[ Reworded slightly. - Miguel ]
Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent 600559b9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -985,7 +985,7 @@ pub fn peek_prev(&self) -> Option<(&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)
    }