@@ -32,24 +32,22 @@ fn send_recv_no_buffer() {
32
32
33
33
// Run on a task context
34
34
let f = poll_fn ( move |cx| {
35
- assert ! ( tx. flush ( cx) . unwrap( ) . is_ready( ) ) ;
35
+ assert ! ( tx. poll_flush ( cx) . unwrap( ) . is_ready( ) ) ;
36
36
assert ! ( tx. poll_ready( cx) . unwrap( ) . is_ready( ) ) ;
37
37
38
38
// Send first message
39
- let res = tx. start_send ( cx, 1 ) . unwrap ( ) ;
40
- assert ! ( res. is_ok( ) ) ;
39
+ assert ! ( tx. start_send( 1 ) . is_ok( ) ) ;
41
40
assert ! ( tx. poll_ready( cx) . unwrap( ) . is_not_ready( ) ) ;
42
41
43
42
// Send second message
44
- let res = tx. start_send ( cx, 2 ) . unwrap ( ) ;
45
- assert ! ( res. is_err( ) ) ;
43
+ assert ! ( tx. poll_ready( cx) . unwrap( ) . is_not_ready( ) ) ;
46
44
47
45
// Take the value
48
46
assert_eq ! ( rx. poll( cx) . unwrap( ) , Async :: Ready ( Some ( 1 ) ) ) ;
49
47
assert ! ( tx. poll_ready( cx) . unwrap( ) . is_ready( ) ) ;
50
48
51
- let res = tx. start_send ( cx, 2 ) . unwrap ( ) ;
52
- assert ! ( res . is_ok( ) ) ;
49
+ assert ! ( tx. poll_ready ( cx) . unwrap( ) . is_ready ( ) ) ;
50
+ assert ! ( tx . start_send ( 2 ) . is_ok( ) ) ;
53
51
assert ! ( tx. poll_ready( cx) . unwrap( ) . is_not_ready( ) ) ;
54
52
55
53
// Take the value
@@ -430,7 +428,7 @@ fn stress_poll_ready() {
430
428
// (asserting that it doesn't attempt to block).
431
429
while self . count > 0 {
432
430
try_ready ! ( self . sender. poll_ready( cx) . map_err( |_| ( ) ) ) ;
433
- assert ! ( self . sender. start_send( cx , self . count) . unwrap ( ) . is_ok( ) ) ;
431
+ assert ! ( self . sender. start_send( self . count) . is_ok( ) ) ;
434
432
self . count -= 1 ;
435
433
}
436
434
Ok ( Async :: Ready ( ( ) ) )
@@ -502,7 +500,7 @@ fn try_send_2() {
502
500
503
501
let th = thread:: spawn ( || {
504
502
block_on ( poll_fn ( |cx| {
505
- assert ! ( tx. start_send ( cx, "fail" ) . unwrap( ) . is_err ( ) ) ;
503
+ assert ! ( tx. poll_ready ( cx) . unwrap( ) . is_not_ready ( ) ) ;
506
504
Ok :: < _ , ( ) > ( Async :: Ready ( ( ) ) )
507
505
} ) ) . unwrap ( ) ;
508
506
0 commit comments