Skip to content

Commit 5f7e5b3

Browse files
committed
Replace futures::future::ready with our implementation in examples
1 parent 7f5780a commit 5f7e5b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/future.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#![feature(futures_api, async_await, await_macro)]
22

33
use futures_async_combinators::future::*;
4-
use futures::{future, executor};
4+
use futures::executor;
55

66
fn main() {
77
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)));
8+
let future = ready(Ok::<i32, i32>(1));
9+
let future = and_then(future, |x| ready(Ok::<i32, i32>(x + 3)));
1010
let future = inspect(future, |x| { dbg!(x); });
1111
assert_eq!(await!(future), Ok(4));
1212
});

0 commit comments

Comments
 (0)