1- use std:: marker:: PhantomData ;
2-
3- use std:: time:: Duration ;
1+ use std:: { convert:: Infallible , marker:: PhantomData , time:: Duration } ;
42
53use crate :: rt:: { Read , Write } ;
64use bytes:: Bytes ;
@@ -19,7 +17,7 @@ use crate::body::{Body, Incoming as IncomingBody};
1917use crate :: client:: dispatch:: { Callback , SendWhen } ;
2018use crate :: common:: io:: Compat ;
2119use crate :: common:: time:: Time ;
22- use crate :: common:: { task, Future , Never , Pin , Poll } ;
20+ use crate :: common:: { task, Future , Pin , Poll } ;
2321use crate :: ext:: Protocol ;
2422use crate :: headers;
2523use crate :: proto:: h2:: UpgradedSendStream ;
@@ -33,11 +31,11 @@ type ClientRx<B> = crate::client::dispatch::Receiver<Request<B>, Response<Incomi
3331
3432///// An mpsc channel is used to help notify the `Connection` task when *all*
3533///// other handles to it have been dropped, so that it can shutdown.
36- type ConnDropRef = mpsc:: Sender < Never > ;
34+ type ConnDropRef = mpsc:: Sender < Infallible > ;
3735
3836///// A oneshot channel watches the `Connection` task, and when it completes,
3937///// the "dispatch" task will be notified and can shutdown sooner.
40- type ConnEof = oneshot:: Receiver < Never > ;
38+ type ConnEof = oneshot:: Receiver < Infallible > ;
4139
4240// Our defaults are chosen for the "majority" case, which usually are not
4341// resource constrained, and so the spec default of 64kb can be too limiting
@@ -267,9 +265,9 @@ pin_project! {
267265 T : Unpin ,
268266 {
269267 #[ pin]
270- drop_rx: StreamFuture <Receiver <Never >>,
268+ drop_rx: StreamFuture <Receiver <Infallible >>,
271269 #[ pin]
272- cancel_tx: Option <oneshot:: Sender <Never >>,
270+ cancel_tx: Option <oneshot:: Sender <Infallible >>,
273271 #[ pin]
274272 conn: ConnMapErr <T , B >,
275273 }
@@ -282,8 +280,8 @@ where
282280{
283281 fn new (
284282 conn : ConnMapErr < T , B > ,
285- drop_rx : StreamFuture < Receiver < Never > > ,
286- cancel_tx : oneshot:: Sender < Never > ,
283+ drop_rx : StreamFuture < Receiver < Infallible > > ,
284+ cancel_tx : oneshot:: Sender < Infallible > ,
287285 ) -> Self {
288286 Self {
289287 drop_rx,
@@ -421,7 +419,7 @@ pin_project! {
421419 #[ pin]
422420 pipe: PipeToSendStream <S >,
423421 #[ pin]
424- conn_drop_ref: Option <Sender <Never >>,
422+ conn_drop_ref: Option <Sender <Infallible >>,
425423 #[ pin]
426424 ping: Option <Recorder >,
427425 }
0 commit comments