File: yield_in_async.rs

package info (click to toggle)
rust-async-stream 0.3.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 236 kB
  • sloc: makefile: 2
file content (11 lines) | stat: -rw-r--r-- 146 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
use async_stream::stream;

fn main() {
    stream! {
        let f = async {
            yield 123;
        };

        let v = f.await;
    };
}