@@ -72,6 +72,8 @@ cfg_feature! {
7272 use std:: pin:: Pin ;
7373 use std:: future:: Future ;
7474 use std:: marker:: Unpin ;
75+ #[ cfg( not( all( feature = "http1" , feature = "http2" ) ) ) ]
76+ use std:: convert:: Infallible ;
7577
7678 use bytes:: Bytes ;
7779 use pin_project_lite:: pin_project;
@@ -80,8 +82,6 @@ cfg_feature! {
8082
8183 pub use super :: server:: Connecting ;
8284 use crate :: body:: { Body , HttpBody } ;
83- #[ cfg( not( all( feature = "http1" , feature = "http2" ) ) ) ]
84- use crate :: common:: Never ;
8585 use crate :: common:: exec:: { ConnStreamExec , Exec } ;
8686 use crate :: proto;
8787 use crate :: service:: HttpService ;
@@ -159,14 +159,14 @@ type Http1Dispatcher<T, B, S> =
159159 proto:: h1:: Dispatcher < proto:: h1:: dispatch:: Server < S , Body > , B , T , proto:: ServerTransaction > ;
160160
161161#[ cfg( all( not( feature = "http1" ) , feature = "http2" ) ) ]
162- type Http1Dispatcher < T , B , S > = ( Never , PhantomData < ( T , Box < Pin < B > > , Box < Pin < S > > ) > ) ;
162+ type Http1Dispatcher < T , B , S > = ( Infallible , PhantomData < ( T , Box < Pin < B > > , Box < Pin < S > > ) > ) ;
163163
164164#[ cfg( feature = "http2" ) ]
165165type Http2Server < T , B , S , E > = proto:: h2:: Server < Rewind < T > , S , B , E > ;
166166
167167#[ cfg( all( not( feature = "http2" ) , feature = "http1" ) ) ]
168168type Http2Server < T , B , S , E > = (
169- Never ,
169+ Infallible ,
170170 PhantomData < ( T , Box < Pin < S > > , Box < Pin < B > > , Box < Pin < E > > ) > ,
171171) ;
172172
0 commit comments