[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <99eff662-417c-4adb-b7dc-7f3053a4d616@konsulko.se>
Date: Mon, 8 Sep 2025 18:41:28 +0200
From: Vitaly Wool <vitaly.wool@...sulko.se>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
Danilo Krummrich <dakr@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>, Bjorn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>,
Trevor Gross <tmgross@...ch.edu>, Onur Özkan
<work@...rozkan.dev>
Subject: Re: [PATCH v3] rust: rbtree: add immutable cursor
On 9/8/25 18:36, Miguel Ojeda wrote:
> On Mon, Sep 8, 2025 at 2:54 PM Vitaly Wool <vitaly.wool@...sulko.se> wrote:
>>
>> Sometimes we may need to iterate over, or find an element in a read
>> only (or read mostly) red-black tree, and in that case we don't need a
>> mutable reference to the tree, which we'll however have to take to be
>> able to use the current (mutable) cursor implementation.
>>
>> This patch adds a simple immutable cursor implementation to RBTree,
>> which enables us to use an immutable tree reference. The existing
>> (fully featured) cursor implementation is renamed to CursorMut,
>> while retaining its functionality.
>>
>> Signed-off-by: Vitaly Wool <vitaly.wool@...sulko.se>
>
> Could you apply the `&raw` operator suggestion from v2 so that we
> don't have to migrate those later?
Absolutely, I wonder though if I'm supposed to do that only for the code
I'm adding, or for the whole file, and if the latter is the preferred
way, if that should be arranged as a 1st patch in a 2 patch series. What
would you recommend?
> Thanks!
>
> (For some reason I am not Cc'd)
Sorry about that, will surely add you for the v4.
Best regards,
Vitaly
Powered by blists - more mailing lists