[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <94252007-f389-41d0-b5a0-ed948225543a@kernel.org>
Date: Mon, 8 Sep 2025 11:06:02 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: Vitaly Wool <vitaly.wool@...sulko.se>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org, 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 v2] rust: rbtree: add immutable cursor
On 9/8/25 10:47 AM, Alice Ryhl wrote:
> On Sat, Sep 06, 2025 at 04:02:56PM +0200, Vitaly Wool wrote:
>> + // SAFETY: `best` is a non-null node so it is valid by the type invariants.
>> + let links = unsafe { addr_of_mut!((*best.as_ptr()).links) };
>
> Since this is rawptr to rawptr, I don't think it matters but it seems
> more natural to use addr_of! here.
Why not use &raw? Consistency with the rest of the file?
Powered by blists - more mailing lists