Re: [PATCH v4 02/11] rust: xarray: add debug format for `StoreError`

From: Andreas Hindborg

Date: Tue Jun 09 2026 - 04:44:49 EST


Tamir Duberstein <tamird@xxxxxxxxxx> writes:

> On Thu, 04 Jun 2026 21:58:08 +0200, Andreas Hindborg <a.hindborg@xxxxxxxxxx> wrote:
>> diff --git a/rust/kernel/xarray.rs b/rust/kernel/xarray.rs
>> index b80fb7a262d0..d54942aeb201 100644
>> --- a/rust/kernel/xarray.rs
>> +++ b/rust/kernel/xarray.rs
>> @@ -193,6 +193,14 @@ pub struct StoreError<T> {
>> pub value: T,
>> }
>>
>> +impl<T> kernel::fmt::Debug for StoreError<T> {
>> + fn fmt(&self, f: &mut kernel::fmt::Formatter<'_>) -> kernel::fmt::Result {
>> + f.debug_struct("StoreError")
>> + .field("error", &self.error)
>> + .finish()
>> + }
>> +}
>> +
>
> Maybe an import of `kernel::fmt` at the top would be cleaner.

Ok, I can do that.

Best regards,
Andreas Hindborg