rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] rust: list: Add examples for linked list
@ 2025-03-10  7:30 I Hsin Cheng
  2025-03-10  7:30 ` [RFC PATCH 1/2] rust: list: Implement normal initializer for ListLinks I Hsin Cheng
  2025-03-10  7:30 ` [RFC PATCH 2/2] rust: list: Add examples for linked list I Hsin Cheng
  0 siblings, 2 replies; 6+ messages in thread
From: I Hsin Cheng @ 2025-03-10  7:30 UTC (permalink / raw)
  To: ojeda
  Cc: alex.gaynor, boqun.feng, gary, bjorn3_gh, benno.lossin,
	a.hindborg, aliceryhl, tmgross, rust-for-linux, linux-kernel,
	skhan, linux-kernel-mentees, jserv, I Hsin Cheng

This patch series introduce runnable examples for linked list. They also
serve as the unit tests for the methods for "List".
A new initialized method is also introduced for "ListLinks", in order to
provide the ability to create a new "ListLinks" instance, and provide
simplicity for the examples.

If there exists a convenient and proper way to handle the return type
of "ListLinks::new()", e.g. "ListLinks::try_pin_init()" , then the
method won't be needed.

I Hsin Cheng (2):
  rust: list: Implement normal initializer for ListLinks
  rust: list: Add examples for linked list

 rust/kernel/list.rs | 100 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 100 insertions(+)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-03-10 11:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-10  7:30 [RFC PATCH 0/2] rust: list: Add examples for linked list I Hsin Cheng
2025-03-10  7:30 ` [RFC PATCH 1/2] rust: list: Implement normal initializer for ListLinks I Hsin Cheng
2025-03-10  9:44   ` Alice Ryhl
2025-03-10 11:14     ` I Hsin Cheng
2025-03-10 11:44       ` Alice Ryhl
2025-03-10  7:30 ` [RFC PATCH 2/2] rust: list: Add examples for linked list I Hsin Cheng

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).