[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH5fLgikAzVv5A_eP7vwqRNka5RAkkyRnSxh-jjnA9DGfbYf_Q@mail.gmail.com>
Date: Mon, 19 May 2025 11:12:55 -0700
From: Alice Ryhl <aliceryhl@...gle.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
Cc: Benno Lossin <lossin@...nel.org>, Miguel Ojeda <ojeda@...nel.org>,
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>, Andreas Hindborg <a.hindborg@...nel.org>,
Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich <dakr@...nel.org>, Tamir Duberstein <tamird@...il.com>,
Dirk Behme <dirk.behme@...bosch.com>, Kartik Prajapati <kartikprajapati987@...il.com>,
Aliet Exposito Garcia <aliet.exposito@...il.com>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rust: types: remove `Either<L, R>`
On Mon, May 19, 2025 at 11:08 AM Miguel Ojeda
<miguel.ojeda.sandonis@...il.com> wrote:
>
> On Mon, May 19, 2025 at 7:30 PM Alice Ryhl <aliceryhl@...gle.com> wrote:
> >
> > I don't mind making a custom enum, but I do use this in Rust Binder.
>
> Yeah, Wedson added the type back then for Binder and kasync from a
> quick look -- in those times, I see it in a few places only, e.g. in
> `get_work_or_register`. Do you have many nowadays?
>
> i.e. I don't want to add extra work for upstreaming Rust Binder, so if
> that would make it harder downstream, we can live with it for the
> moment.
>
> We may want to add a line in the docs to ask the potential user to
> consider whether a custom enum would be better nevertheless.
It's used get_work_or_register to return either work, or a
registration waiting for work if the work list is empty. I believe
there is only that one use.
Alice
Powered by blists - more mailing lists