|
|
Subscribe / Log in / New account

Make the Rust linked list cursor point between elements

From:  Alice Ryhl <aliceryhl-AT-google.com>
To:  Miguel Ojeda <ojeda-AT-kernel.org>
Subject:  [PATCH v2 0/2] Make the Rust linked list cursor point between elements
Date:  Tue, 21 Jan 2025 10:14:22 +0000
Message-ID:  <20250121-cursor-between-v2-0-1b24cd377618@google.com>
Cc:  Alex Gaynor <alex.gaynor-AT-gmail.com>, Boqun Feng <boqun.feng-AT-gmail.com>, Gary Guo <gary-AT-garyguo.net>, "Björn Roy Baron" <bjorn3_gh-AT-protonmail.com>, Benno Lossin <benno.lossin-AT-proton.me>, Andreas Hindborg <a.hindborg-AT-kernel.org>, Trevor Gross <tmgross-AT-umich.edu>, rust-for-linux-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org, Alice Ryhl <aliceryhl-AT-google.com>
Archive-link:  Article

Please see the commit message of the last patch for more details and
motivation.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Changes in v2:
- Extract insert_inner refactor to separate patch.
- Make move_next/move_prev not wrap around.
- Add some examples.
- Link to v1: https://lore.kernel.org/r/20241025-cursor-between-v1-1-08...

---
Alice Ryhl (2):
      rust: list: extract common code for insertion
      rust: list: make the cursor point between elements

 rust/kernel/list.rs | 401 ++++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 308 insertions(+), 93 deletions(-)
---
base-commit: ceff0757f5dafb5be5205988171809c877b1d3e3
change-id: 20241016-cursor-between-154bed859e27

Best regards,
-- 
Alice Ryhl <aliceryhl@google.com>




Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds