History

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.

Hang Shu committed 1 year ago

Commit 45f6aed1 parent 600559b1 file · +1 −1Browse files

Unified · Split

rust/kernel/rbtree.rs+1−1
@@ -985,7 +985,7 @@ impl<'a, K, V> CursorMut<'a, K, V> { · 984 unmodified lines
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 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t