File: yield_in_async.rs

package info (click to toggle)
rust-async-stream 0.3.4-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 216 kB
  • sloc: makefile: 2
file content (11 lines) | stat: -rw-r--r-- 146 bytes parent folder | download | duplicates (2)
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;
    };
}