Skip to content

Commit b21f0f6

Browse files
committed
Use code style in example/future as in stream's
1 parent d08447f commit b21f0f6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

examples/future.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ use futures::executor;
22
use futures_async_combinators::future::*;
33

44
fn main() {
5-
executor::block_on(async {
6-
let future = ready(Ok::<i32, i32>(1));
7-
let future = and_then(future, |x| ready(Ok::<i32, i32>(x + 3)));
8-
let future = inspect(future, |x| {
9-
dbg!(x);
10-
});
11-
assert_eq!(future.await, Ok(4));
5+
let future = ready(Ok::<i32, i32>(1));
6+
let future = and_then(future, |x| ready(Ok::<i32, i32>(x + 3)));
7+
let future = inspect(future, |x| {
8+
dbg!(x);
129
});
10+
11+
let res = executor::block_on(future);
12+
assert_eq!(res, Ok(4));
1313
}

0 commit comments

Comments
 (0)