We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20a228f commit 44ba8e9Copy full SHA for 44ba8e9
examples/stream.rs
@@ -0,0 +1,15 @@
1
+#![feature(futures_api, async_await, await_macro)]
2
+
3
+use futures_async_combinators::stream::*;
4
+use futures::{stream, executor};
5
6
+fn main() {
7
+ let stream = stream::iter(1..=3);
8
+ let stream = map(stream, |x| x + 1);
9
+ let stream = map(stream, |x| x * 2);
10
11
+ let collect_future = collect(stream);
12
+ let collection : Vec<_> = executor::block_on(collect_future);
13
14
+ assert_eq!(vec![4, 6, 8], collection);
15
+}
0 commit comments