futures-async-stream 0.2.13

Async stream for Rust and the futures crate.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// SPDX-License-Identifier: Apache-2.0 OR MIT

#![feature(coroutines)]

use futures_async_stream::stream_block;

fn foo<F: FnMut()>(_f: F) {}

fn main() {
    let a = String::new();
    foo(|| {
        stream_block! { //~ ERROR cannot move out of `a`, a captured variable in an `FnMut` closure
            yield a
        };
    });
}