11use futures:: channel:: { mpsc, oneshot} ;
22use futures:: executor:: block_on;
33use futures:: future:: { self , poll_fn, Future , FutureExt , TryFutureExt } ;
4- use futures:: never:: Never ;
54use futures:: ready;
65use futures:: sink:: { self , Sink , SinkErrInto , SinkExt } ;
76use futures:: stream:: { self , Stream , StreamExt } ;
87use futures:: task:: { self , ArcWake , Context , Poll , Waker } ;
98use futures_test:: task:: panic_context;
109use std:: cell:: { Cell , RefCell } ;
1110use std:: collections:: VecDeque ;
11+ use std:: convert:: Infallible ;
1212use std:: fmt;
1313use std:: mem;
1414use std:: pin:: Pin ;
@@ -307,7 +307,7 @@ fn with_flush() {
307307 let mut sink = Vec :: new ( ) . with ( |elem| {
308308 mem:: replace ( & mut block, future:: ok ( ( ) ) . boxed ( ) )
309309 . map_ok ( move |( ) | elem + 1 )
310- . map_err ( |_| -> Never { panic ! ( ) } )
310+ . map_err ( |_| -> Infallible { panic ! ( ) } )
311311 } ) ;
312312
313313 assert_eq ! ( Pin :: new( & mut sink) . start_send( 0 ) . ok( ) , Some ( ( ) ) ) ;
@@ -328,7 +328,7 @@ fn with_flush() {
328328// test simple use of with to change data
329329#[ test]
330330fn with_as_map ( ) {
331- let mut sink = Vec :: new ( ) . with ( |item| future:: ok :: < i32 , Never > ( item * 2 ) ) ;
331+ let mut sink = Vec :: new ( ) . with ( |item| future:: ok :: < i32 , Infallible > ( item * 2 ) ) ;
332332 block_on ( sink. send ( 0 ) ) . unwrap ( ) ;
333333 block_on ( sink. send ( 1 ) ) . unwrap ( ) ;
334334 block_on ( sink. send ( 2 ) ) . unwrap ( ) ;
0 commit comments