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
Searching through past issues didn't turn anything up, but it seems like a killer feature for streams would be, roughly, async for x in stream { ... }. While this doesn't work currently, it seems relatively straightforward to write a macro_rule! for it?
asyncfntest_async_for<S:Stream<Item = u8>>(mutstream:S){letmut stream = core::pin::pin!(stream);// Commenting this line out makes building fail.async_for!(x in stream.by_ref(), {
println!("{}", x);
break;
});println!("{:?}", stream.next().await);}
worked just fine using the macro.
The text was updated successfully, but these errors were encountered:
Searching through past issues didn't turn anything up, but it seems like a killer feature for streams would be, roughly,
async for x in stream { ... }
. While this doesn't work currently, it seems relatively straightforward to write a macro_rule! for it?A simple test like
worked just fine using the macro.
The text was updated successfully, but these errors were encountered: