public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Gary Guo <gary@garyguo.net>
To: WeiKang Guo <guoweikang.kernel@outlook.com>
Cc: <ojeda@kernel.org>, <boqun.feng@gmail.com>,
	<bjorn3_gh@protonmail.com>, <lossin@kernel.org>,
	<a.hindborg@kernel.org>, <aliceryhl@google.com>,
	<tmgross@umich.edu>, <akr@kernel.org>, <mattgilbride@google.com>,
	<rust-for-linux@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<stable@vger.kernel.org>
Subject: Re: [PATCH] docs: rust: rbtree: fix incorrect description for `peek_next`
Date: Mon, 15 Dec 2025 12:13:02 +0000	[thread overview]
Message-ID: <20251215121302.013ba3fa.gary@garyguo.net> (raw)
In-Reply-To: <JH0PR01MB55140AA42EB3AAF96EF7F3E8ECAEA@JH0PR01MB5514.apcprd01.prod.exchangelabs.com>

On Fri, 12 Dec 2025 17:31:10 +0800
WeiKang Guo <guoweikang.kernel@outlook.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@kernel.org>
> Closes: https://github.com/Rust-for-Linux/linux/issues/1205
> Fixes: 98c14e40e07a0 ("rust: rbtree: add cursor")
> Cc: stable@vger.kernel.org
> Signed-off-by: WeiKang Guo <guoweikang.kernel@outlook.com>

Reviewed-by: Gary Guo <gary@garyguo.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)
>      }


  reply	other threads:[~2025-12-15 12:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-12  9:31 [PATCH] docs: rust: rbtree: fix incorrect description for `peek_next` WeiKang Guo
2025-12-15 12:13 ` Gary Guo [this message]
2025-12-17 20:39 ` Alice Ryhl
  -- strict thread matches above, loose matches on Subject: below --
2025-12-12  9:10 WeiKang Guo
2026-01-04 22:52 ` Miguel Ojeda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251215121302.013ba3fa.gary@garyguo.net \
    --to=gary@garyguo.net \
    --cc=a.hindborg@kernel.org \
    --cc=akr@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=guoweikang.kernel@outlook.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=mattgilbride@google.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox