[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <df637115-e0ce-45ae-a9b6-817ea7454bce@kernel.org>
Date: Tue, 10 Jun 2025 15:44:44 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: Benno Lossin <lossin@...nel.org>
Cc: Andreas Hindborg <a.hindborg@...nel.org>,
Boqun Feng <boqun.feng@...il.com>, Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
Jens Axboe <axboe@...nel.dk>, Fiona Behrens <me@...enk.dev>,
Christian Schrefl <chrisi.schrefl@...il.com>, linux-block@...r.kernel.org,
rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] change blanket impls for `[Pin]Init` and add one for
`Result<T, E>`
On 5/29/25 10:10 AM, Benno Lossin wrote:
> Remove the error from the blanket implementations `impl<T, E> Init<T, E>
> for T` (and also for `PinInit`). Add implementations for `Result<T, E>`.
>
> This allows one to easily construct (un)conditional failing
> initializers. It also improves the compatibility with APIs that do not
> use pin-init, because users can supply a `Result<T, E>` to a function
> taking an `impl PinInit<T, E>`.
>
> Suggested-by: Alice Ryhl <aliceryhl@...gle.com>
> Link: https://github.com/Rust-for-Linux/pin-init/pull/62/commits/58612514b256c6f4a4a0718be25298410e67387a
> [ Also fix a compile error in block. - Benno ]
> Signed-off-by: Benno Lossin <lossin@...nel.org>
> ---
>
> This patch is also needed by Danilo for initializing `Devres`
> ergonomically.
For this purpose, can you please provide me with a signed tag for this one
please? Otherwise I can also add the explicit `Infallible` generics in a few
places until next cycle.
Powered by blists - more mailing lists