[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20251107024720.369067-1-m18080292938@163.com>
Date: Fri, 7 Nov 2025 02:47:16 +0000
From: Hang Shu <m18080292938@....com>
To: ojeda@...nel.org
Cc: Hang Shu <hangshu847@...il.com>,
Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <lossin@...nel.org>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>,
Danilo Krummrich <dakr@...nel.org>,
Yutaro Ohno <yutaro.ono.418@...il.com>,
Onur Özkan <work@...rozkan.dev>,
Borys Tyran <borys.tyran@...tonmail.com>,
Charalampos Mitrodimas <charmitro@...teo.net>,
Daniel Sedlak <daniel@...lak.dev>,
Tamir Duberstein <tamird@...il.com>,
Matt Gilbride <mattgilbride@...gle.com>,
rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] rust: correct documentation comment for rbtree cursor peek_next method
From: Hang Shu <hangshu847@...il.com>
The peek_next method's doc comment incorrectly stated it accesses the
"previous" node when it actually accesses the next node. This commit
fixes the documentation to accurately reflect the method's behavior.
Fixes: 98c14e40e07a ("rust: rbtree: add cursor")
Signed-off-by: Hang Shu <hangshu847@...il.com>
---
rust/kernel/rbtree.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rust/kernel/rbtree.rs b/rust/kernel/rbtree.rs
index b8fe6be6fcc4..9e178dacddf1 100644
--- a/rust/kernel/rbtree.rs
+++ b/rust/kernel/rbtree.rs
@@ -835,7 +835,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)
}
--
2.43.0
Powered by blists - more mailing lists