-
Notifications
You must be signed in to change notification settings - Fork 639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Propagate either feature and enable by default from the facade #1151
Conversation
Is this primarily for streams and sinks? Because we can no longer implement |
I didn’t actually check what it enabled, I just noticed it wasn’t propagated when looking at the compat stuff. Maybe it would be better to just drop the either stuff now that it can’t be implemented for |
I still think that some form or another of the either stuff is still needed so long as we don't have |
We could introduce a
e.g. enum Coalesce3<T1, T2, T3> {
Variant1(T1),
Variant2(T2),
Variant3(T3),
} That enum would be local to our crate. We can add a correct impl<T1: Unpin, T2: Unpin, T3: Unpin> Unpin for Coalesce3 {} and The main advantage is of course that we can add support for more than two variants. I'd say five, like we have for Edit: I don't think that we should add combinator methods for this. At least I think so :) |
@MajorBreakfast I have a macro that does this in fuchsia already. However, I realized that it is |
@cramertj I actually didn't consider that we could make the macro public. But it makes sense to do so. If it's prefixed with I think it makes sense to expose the macro because I'm certain that someone can come up with a use case that requires 12 variants. |
@MajorBreakfast okay! yeah, in that case you can just drag-and-drop https://fuchsia.googlesource.com/garnet/+/sandbox/cramertj/asyncing/public/rust/crates/fuchsia-async/src/lib.rs#46 (although you'd want to change the You'd also want to add the The |
I'd prefer to remove the I suggest to not add any combinator methods. If we added methods for |
No description provided.