[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANiq72=zXOqvdttGjxGrbGoNvyz=QNb5sCE1FKROgKo5yEkfBQ@mail.gmail.com>
Date: Wed, 31 May 2023 19:09:13 +0200
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: Miguel Ojeda <ojeda@...nel.org>,
Wedson Almeida Filho <wedsonaf@...il.com>,
Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
patches@...ts.linux.dev
Subject: Re: [PATCH] rust: error: allow specifying error type on `Result`
On Tue, May 2, 2023 at 2:40 PM Alice Ryhl <aliceryhl@...gle.com> 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@...gle.com>
Applied to `rust-next` -- thanks everyone!
Cheers,
Miguel
Powered by blists - more mailing lists