Re: [PATCH] rust: error: allow specifying error type on `Result`

From: Miguel Ojeda
Date: Wed May 31 2023 - 13:09:35 EST


On Tue, May 2, 2023 at 2:40 PM Alice Ryhl <aliceryhl@xxxxxxxxxx> wrote:
>
> Currently, if the `kernel::error::Result` type is in scope (which is
> often is, since it's in the kernel's prelude), you cannot write
> `Result<T, SomeOtherErrorType>` when you want to use a different error
> type than `kernel::error::Error`.
>
> To solve this we change the error type from being hard-coded to just
> being a default generic parameter. This still lets you write `Result<T>`
> when you just want to use the `Error` error type, but also lets you
> write `Result<T, SomeOtherErrorType>` when necessary.
>
> Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>

Applied to `rust-next` -- thanks everyone!

Cheers,
Miguel