We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b943ae3 commit ad82340Copy full SHA for ad82340
src/lib.rs
@@ -507,10 +507,7 @@ pub mod channel {
507
) -> impl n0_future::Stream<Item = std::result::Result<T, RecvError>> + Send + 'static
508
{
509
n0_future::stream::unfold(self, |mut recv| async move {
510
- match recv.recv().await.transpose() {
511
- Some(msg) => Some((msg, recv)),
512
- None => None,
513
- }
+ recv.recv().await.transpose().map(|msg| (msg, recv))
514
})
515
}
516
0 commit comments