1
+ use std:: convert:: Infallible ;
2
+
1
3
mod sassert_next {
2
4
use futures:: stream:: { Stream , StreamExt } ;
3
5
use futures:: task:: Poll ;
@@ -356,7 +358,6 @@ fn with_flush() {
356
358
use futures:: channel:: oneshot;
357
359
use futures:: executor:: block_on;
358
360
use futures:: future:: { self , FutureExt , TryFutureExt } ;
359
- use futures:: never:: Never ;
360
361
use futures:: sink:: { Sink , SinkExt } ;
361
362
use std:: mem;
362
363
use std:: pin:: Pin ;
@@ -369,7 +370,7 @@ fn with_flush() {
369
370
let mut sink = Vec :: new ( ) . with ( |elem| {
370
371
mem:: replace ( & mut block, future:: ok ( ( ) ) . boxed ( ) )
371
372
. map_ok ( move |( ) | elem + 1 )
372
- . map_err ( |_| -> Never { panic ! ( ) } )
373
+ . map_err ( |_| -> Infallible { panic ! ( ) } )
373
374
} ) ;
374
375
375
376
assert_eq ! ( Pin :: new( & mut sink) . start_send( 0 ) . ok( ) , Some ( ( ) ) ) ;
@@ -392,10 +393,9 @@ fn with_flush() {
392
393
fn with_as_map ( ) {
393
394
use futures:: executor:: block_on;
394
395
use futures:: future;
395
- use futures:: never:: Never ;
396
396
use futures:: sink:: SinkExt ;
397
397
398
- let mut sink = Vec :: new ( ) . with ( |item| future:: ok :: < i32 , Never > ( item * 2 ) ) ;
398
+ let mut sink = Vec :: new ( ) . with ( |item| future:: ok :: < i32 , Infallible > ( item * 2 ) ) ;
399
399
block_on ( sink. send ( 0 ) ) . unwrap ( ) ;
400
400
block_on ( sink. send ( 1 ) ) . unwrap ( ) ;
401
401
block_on ( sink. send ( 2 ) ) . unwrap ( ) ;
0 commit comments