File tree Expand file tree Collapse file tree 4 files changed +405
-381
lines changed Expand file tree Collapse file tree 4 files changed +405
-381
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ maintenance = { status = "experimental" }
19
19
20
20
[dependencies ]
21
21
pin-utils = " =0.1.0-alpha.4"
22
+ async-trait = " 0.1.3"
22
23
23
24
[dependencies .futures ]
24
25
version = " =0.3.0-alpha.18"
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ fn bench_map(c: &mut Criterion) {
63
63
b. iter ( async move || {
64
64
use futures_async_combinators:: future:: * ;
65
65
let fut = ready ( 40 ) ;
66
- let fut = map ( fut , |x| x + 2 ) ;
66
+ let fut = fut . map ( |x| x + 2 ) ;
67
67
black_box ( fut) . await
68
68
} )
69
69
} ) ;
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ use futures_async_combinators::future::*;
4
4
fn main ( ) {
5
5
executor:: block_on ( async {
6
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| {
7
+ let future = future . and_then ( |x| ready ( Ok :: < i32 , i32 > ( x + 3 ) ) ) ;
8
+ let future = future . inspect ( |x| {
9
9
dbg ! ( x) ;
10
10
} ) ;
11
11
assert_eq ! ( future. await , Ok ( 4 ) ) ;
You can’t perform that action at this time.
0 commit comments