Skip to content
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

Support chained stream #95

Open
ethe opened this issue Jan 12, 2024 · 1 comment
Open

Support chained stream #95

ethe opened this issue Jan 12, 2024 · 1 comment

Comments

@ethe
Copy link
Contributor

ethe commented Jan 12, 2024

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.

@taiki-e
Copy link
Owner

taiki-e commented Jan 12, 2024

relying on feature stmt_expr_attributes

FYI, you can use stream_block macro to work around stmt_expr_attributes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants