[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251215121302.013ba3fa.gary@garyguo.net>
Date: Mon, 15 Dec 2025 12:13:02 +0000
From: Gary Guo <gary@...yguo.net>
To: WeiKang Guo <guoweikang.kernel@...look.com>
Cc: <ojeda@...nel.org>, <boqun.feng@...il.com>, <bjorn3_gh@...tonmail.com>,
<lossin@...nel.org>, <a.hindborg@...nel.org>, <aliceryhl@...gle.com>,
<tmgross@...ch.edu>, <akr@...nel.org>, <mattgilbride@...gle.com>,
<rust-for-linux@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<stable@...r.kernel.org>
Subject: Re: [PATCH] docs: rust: rbtree: fix incorrect description for
`peek_next`
On Fri, 12 Dec 2025 17:31:10 +0800
WeiKang Guo <guoweikang.kernel@...look.com> wrote:
> The documentation for `Cursor::peek_next` incorrectly describes it as
> "Access the previous node without moving the cursor" when it actually
> accesses the next node. Update the description to correctly state
> "Access the next node without moving the cursor" to match the function
> name and implementation.
>
> Reported-by: Miguel Ojeda <ojeda@...nel.org>
> Closes: https://github.com/Rust-for-Linux/linux/issues/1205
> Fixes: 98c14e40e07a0 ("rust: rbtree: add cursor")
> Cc: stable@...r.kernel.org
> Signed-off-by: WeiKang Guo <guoweikang.kernel@...look.com>
Reviewed-by: Gary Guo <gary@...yguo.net>
> ---
> 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 4729eb56827a..cd187e2ca328 100644
> --- a/rust/kernel/rbtree.rs
> +++ b/rust/kernel/rbtree.rs
> @@ -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)
> }
Powered by blists - more mailing lists