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 7f5780a commit 5f7e5b3Copy full SHA for 5f7e5b3
examples/future.rs
@@ -1,12 +1,12 @@
1
#![feature(futures_api, async_await, await_macro)]
2
3
use futures_async_combinators::future::*;
4
-use futures::{future, executor};
+use futures::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)));
+ let future = ready(Ok::<i32, i32>(1));
+ let future = and_then(future, |x| ready(Ok::<i32, i32>(x + 3)));
10
let future = inspect(future, |x| { dbg!(x); });
11
assert_eq!(await!(future), Ok(4));
12
});
0 commit comments