Re: [PATCH 2/3] rust: dma: convert the read/write macros to return Result

From: Andreas Hindborg
Date: Tue Apr 08 2025 - 15:47:08 EST


"Miguel Ojeda" <miguel.ojeda.sandonis@xxxxxxxxx> writes:

> On Tue, Apr 8, 2025 at 2:40 PM Andreas Hindborg <a.hindborg@xxxxxxxxxx> wrote:
>>
>> But the `assert_eq!` would panic anyway if comparison fails, right?
>
> Previously the `?` generated by the macro would return out of the
> closure written by the sample, and thus it wouldn't reach the
> `assert_eq!`.

Right, I see. So the question is whether we want to have the assert
panic here or not, of we get an Err. I vote yes.


Best regards,
Andreas Hindborg