Re: [PATCH v3 1/6] rust: add warn_on_err macro

From: Miguel Ojeda

Date: Sun Apr 26 2026 - 09:31:10 EST


On Wed, Apr 22, 2026 at 3:41 PM Alexandre Courbot <acourbot@xxxxxxxxxx> wrote:
>
> While we already have the `warn_on` macro, a common usage pattern in
> Rust is to check whether a `Result` is an error. Add a helper macro that
> allows this.
>
> Reviewed-by: Eliot Courtney <ecourtney@xxxxxxxxxx>
> Signed-off-by: Alexandre Courbot <acourbot@xxxxxxxxxx>

I saw the discussion with Gary in v2 -- not sure if you are still
putting this in. If so, and assuming Gary is OK with it, I guess it is
fine as-is for now, but we should probably create at least a (good
first?) issue:

Acked-by: Miguel Ojeda <ojeda@xxxxxxxxxx>

Not sure about Sashiko's report -- it may be nice to make the macro
more transparent, even if it would be rare to use it with expressions
where it would matter.

Thanks!

Cheers,
Miguel