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.
Showing the changes to rust/kernel (1 of 1 file). Show all
Unified · Split
| @@ -985,7 +985,7 @@ impl<'a, K, V> CursorMut<'a, K, V> { · 984 unmodified lines | |||
| 985 | self.peek(Direction::Prev) | 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 | pub fn peek_next(&self) -> Option<(&K, &V)> { | 989 | pub fn peek_next(&self) -> Option<(&K, &V)> { |
| 990 | self.peek(Direction::Next) | 990 | self.peek(Direction::Next) |
| 991 | } | 991 | } |