Re: [PATCH] rust: types: remove `Either<L, R>`
From: Alice Ryhl
Date: Mon May 19 2025 - 13:30:31 EST
On Mon, May 19, 2025 at 5:43 AM Benno Lossin <lossin@xxxxxxxxxx> wrote:
>
> This enum is not used. Additionally, using it would result in poor
> ergonomics, because in order to do any operation on a value it has to be
> matched first. Our version of `Either` also doesn't provide any helper
> methods making it even more difficult to use.
>
> The alternative of creating a custom enum for the concrete use-case also
> is much better for ergonomics. As one can provide functions on the type
> directly and users don't need to match the value manually.
>
> Signed-off-by: Benno Lossin <lossin@xxxxxxxxxx>
I don't mind making a custom enum, but I do use this in Rust Binder.
Alice