From: Miguel Ojeda <ojeda@kernel.org>
To: richard120310@gmail.com
Cc: a.hindborg@kernel.org, alex.gaynor@gmail.com,
aliceryhl@google.com, benno.lossin@proton.me,
bjorn3_gh@protonmail.com, boqun.feng@gmail.com, dakr@kernel.org,
gary@garyguo.net, jserv@ccns.ncku.edu.tw,
linux-kernel-mentees@lists.linux.dev,
linux-kernel@vger.kernel.org, ojeda@kernel.org,
rust-for-linux@vger.kernel.org, skhan@linuxfoundation.org,
tmgross@umich.edu
Subject: Re: [RFC PATCH v2] rust: list: Add examples for linked list
Date: Wed, 21 May 2025 17:27:05 +0200 [thread overview]
Message-ID: <20250521152705.1056252-1-ojeda@kernel.org> (raw)
In-Reply-To: <20250311133357.90322-1-richard120310@gmail.com>
On Tue, 11 Mar 2025 21:33:57 +0800 I Hsin Cheng <richard120310@gmail.com> wrote:
>
> Add basic examples for the structure "List", also serve as the unit
> tests for basic list methods. Including the following manipulations:
> * List creation
> * List emptiness check
> * List insertion through push_front(), push_back()
> * List item removal through pop_front(), pop_back()
> * Push one list to another through push_all_back()
>
> The method "remove()" doesn't have an example here because insertion
> with push_front() or push_back() will take the ownership of the item,
> which means we can't keep any valid reference to the node we want to
> remove, unless Cursor is used. The remove example through Cursor is
> already demonstrate with 'commit 52ae96f5187c ("rust: list: make the
> cursor point between elements")' .
>
> Link: https://github.com/Rust-for-Linux/linux/issues/1121
> Signed-off-by: I Hsin Cheng <richard120310@gmail.com>
It would be nice to pick this one up, even if it is similar to the
cursor one -- some methods shown here are not in the other example.
Any reviews Reviewed-bys/Tested-bys, anyone? (I can clean a few nits on
my side when applying).
By the way, similarly to the other one, your email did not reach my
inbox for some reason.
Thanks!
Cheers,
Miguel
next prev parent reply other threads:[~2025-05-21 15:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 13:33 [RFC PATCH v2] rust: list: Add examples for linked list I Hsin Cheng
2025-05-21 15:27 ` Miguel Ojeda [this message]
2025-05-21 23:08 ` Alice Ryhl
2025-05-22 9:49 ` Miguel Ojeda
2025-05-22 9:51 ` Benno Lossin
2025-05-22 10:05 ` 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=20250521152705.1056252-1-ojeda@kernel.org \
--to=ojeda@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=jserv@ccns.ncku.edu.tw \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=richard120310@gmail.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=skhan@linuxfoundation.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;
as well as URLs for NNTP newsgroup(s).