Re: [PATCH] rust: types: remove `Either<L, R>`
From: Benno Lossin
Date: Mon May 19 2025 - 14:23:30 EST
On Mon May 19, 2025 at 8:08 PM CEST, Miguel Ojeda wrote:
> On Mon, May 19, 2025 at 7:30 PM Alice Ryhl <aliceryhl@xxxxxxxxxx> 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.
I can also take a look and make a patch that uses a custom enum instead
if you don't want to do that, Alice.
Another option would be to deprecate it. Do I remember correctly that
Linus doesn't like that? If yes, then that maybe isn't a good idea...
> 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.
Yeah that too.
---
Cheers,
Benno