File tree 3 files changed +12
-11
lines changed
3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 16
16
steps :
17
17
- uses : actions/checkout@v2
18
18
- name : build
19
- run : cargo build --tests --benches --verbose
19
+ run : cargo build --tests --examples -- benches --verbose
20
20
- name : test
21
21
run : cargo test --verbose
22
22
29
29
- uses : actions-rs/cargo@v1
30
30
with :
31
31
command : clippy
32
- args : --all --lib --tests -- --deny warnings
32
+ args : --all --lib --tests --examples -- --deny warnings
33
33
34
34
coverage :
35
35
name : coverage
Original file line number Diff line number Diff line change @@ -2,12 +2,12 @@ use futures::executor;
2
2
use futures_async_combinators:: future:: * ;
3
3
4
4
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) ;
12
9
} ) ;
10
+
11
+ let res = executor:: block_on ( future) ;
12
+ assert_eq ! ( res, Ok ( 4 ) ) ;
13
13
}
Original file line number Diff line number Diff line change 1
- #![ type_length_limit="2111998" ]
2
-
3
1
use futures:: executor;
4
2
use futures_async_combinators:: stream:: * ;
5
3
6
4
fn main ( ) {
7
5
let stream = iter ( 1 ..=3 ) ;
8
6
let stream = map ( stream, |x| x + 1 ) ;
9
7
let stream = map ( stream, |x| x * 2 ) ;
8
+ let stream = inspect ( stream, |x| {
9
+ dbg ! ( x) ;
10
+ } ) ;
10
11
11
12
let collect_future = collect ( stream) ;
12
13
let collection: Vec < _ > = executor:: block_on ( collect_future) ;
You can’t perform that action at this time.
0 commit comments