[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a5cca6ca-9147-4531-81d8-05af1333848b@kernel.org>
Date: Tue, 21 Oct 2025 18:02:39 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: FUJITA Tomonori <fujita.tomonori@...il.com>,
daniel.almeida@...labora.com, a.hindborg@...nel.org, alex.gaynor@...il.com,
ojeda@...nel.org, anna-maria@...utronix.de, bjorn3_gh@...tonmail.com,
boqun.feng@...il.com, frederic@...nel.org, gary@...yguo.net,
jstultz@...gle.com, linux-kernel@...r.kernel.org, lossin@...nel.org,
lyude@...hat.com, rust-for-linux@...r.kernel.org, sboyd@...nel.org,
tglx@...utronix.de, tmgross@...ch.edu
Subject: Re: [PATCH v2 2/2] rust: Add read_poll_count_atomic function
On 10/21/25 4:05 PM, Alice Ryhl wrote:
> On Tue, Oct 21, 2025 at 02:35:34PM +0200, Danilo Krummrich wrote:
>> Please replace the match statement with map().
>>
>> read_poll_count_atomic(
>> ...
>> )
>> .map(|_| ())
>>
>
> IMO, this should instead be:
>
> read_poll_count_atomic(
> ...
> )?
> Ok(())
I think map() has the advantage that it is a bit more explicit about the fact
that the return value is discarded intentionally.
But I'm fine with either version.
Powered by blists - more mailing lists