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

From: Tamir Duberstein

Date: Fri Jun 05 2026 - 11:21:03 EST


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.

--
Tamir Duberstein <tamird@xxxxxxxxxx>