Re: [RFC v3 22/27] lib: rspdm: Support SPDM certificate validation

From: Alistair Francis

Date: Tue Mar 31 2026 - 21:48:47 EST


On Tue, Mar 31, 2026 at 8:11 PM Miguel Ojeda
<miguel.ojeda.sandonis@xxxxxxxxx> wrote:
>
> On Tue, Mar 31, 2026 at 5:30 AM Alistair Francis <alistair23@xxxxxxxxx> wrote:
> >
> > Yep, same thing. My way is the Rust-y way to do it
>
> Hmm... In what way? I would say it is the other way around.

I think it's Rust-ier as it uses the fact that
* if statements can be used as expressions, which is a cool feature of Rust
* Rust is explicit about comparisons being bools (no `if (value)` for example)

So I find the if statement expression returning explicit bools very
Rust-y and easier to read

Alistair

>
> Clippy should be flagging this, too.
>
> Cheers,
> Miguel