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" }
1919
2020[dependencies ]
2121pin-utils = " =0.1.0-alpha.4"
22+ async-trait = " 0.1.3"
2223
2324[dependencies .futures ]
2425version = " =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) {
6363 b. iter ( async move || {
6464 use futures_async_combinators:: future:: * ;
6565 let fut = ready ( 40 ) ;
66- let fut = map ( fut , |x| x + 2 ) ;
66+ let fut = fut . map ( |x| x + 2 ) ;
6767 black_box ( fut) . await
6868 } )
6969 } ) ;
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ use futures_async_combinators::future::*;
44fn main ( ) {
55 executor:: block_on ( async {
66 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| {
99 dbg ! ( x) ;
1010 } ) ;
1111 assert_eq ! ( future. await , Ok ( 4 ) ) ;
You can’t perform that action at this time.
0 commit comments