You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
futures::select! requires that the streams selected over implement futures::FusedStream. There's a .fuse() method on futures::StreamExt which fuses any stream. The problem is, to use StreamExt::fuse on has to import this trait, and then the .next method collides between async_std::Stream and futures::StreamExt.
We now have async-macros which has stream::join that allows bypassing the problems futures_preview::select has.
The pattern is to define an enum of event kinds, and then map each individual stream to be a member of that enum. Then using async iteration + match the same semantics can be achieved as futures_preview::select.
futures::select!
requires that the streams selected over implementfutures::FusedStream
. There's a.fuse()
method onfutures::StreamExt
which fuses any stream. The problem is, to useStreamExt::fuse
on has to import this trait, and then the.next
method collides betweenasync_std::Stream
andfutures::StreamExt
.See also async-rs/a-chat#1 (comment)
The text was updated successfully, but these errors were encountered: