Re: [PATCH v2 1/1] rust: simplify `Adapter::id_info`

From: Alexandre Courbot

Date: Sat Jan 24 2026 - 08:20:55 EST


On Sat Jan 17, 2026 at 9:53 PM JST, Danilo Krummrich wrote:
> On Sat Jan 17, 2026 at 1:07 PM CET, Greg KH wrote:
>> Does clippy complain about this one?
>
> No, it does not.
>
>> I don't have strong feelings either, but the original is "easier" for
>> those of us used to C code.
>
> I think it's a matter of preference. Personally, I like those functional
> characteristics of Rust and the corresponding possibility of compact expressions
> as long as it is not overdone.
>
> This case seems pretty simple though. :)

IIUC for this patch the consensus seems to be in favor of preserving the
original C-like style, but FWIW I found the new style proposed by Onur
easier to read.

I understand that it may not be intuitive unless one has some
familiarity with Rust, but it is a common way to write things in that
language and since it has graduated from its experimental status, it
doesn't seem judicious to me to artificially restrict its features.