futures-async-stream
futures-async-stream copied to clipboard
Support chained stream
Got compiling error on below code:
pub fn chained_stream() -> impl Stream {
#[stream]
async {
yield 1;
}
.map(|d| d * 2)
}
error: unexpected token
--> tests/stream.rs:215:6
|
215 | .map(|d| d * 2)
| ^^^
I think relying on feature stmt_expr_attributes would makes a little bit hard to support this.
relying on feature stmt_expr_attributes
FYI, you can use stream_block macro to work around stmt_expr_attributes.