We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 917c122 commit d106ff9Copy full SHA for d106ff9
examples/future.rs
@@ -0,0 +1,13 @@
1
+#![feature(futures_api, async_await, await_macro)]
2
+
3
+use futures_async_combinators::future::*;
4
+use futures::{future, executor};
5
6
+fn main() {
7
+ executor::block_on(async {
8
+ let future = future::ready(Ok::<i32, i32>(1));
9
+ let future = and_then(future, |x| future::ready(Ok::<i32, i32>(x + 3)));
10
+ let future = inspect(future, |x| { dbg!(x); });
11
+ assert_eq!(await!(future), Ok(4));
12
+ });
13
+}
0 commit comments