File tree Expand file tree Collapse file tree 4 files changed +853
-2
lines changed Expand file tree Collapse file tree 4 files changed +853
-2
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,11 @@ use crate::error::{Kind, Parse};
5858#[ cfg( feature = "http1" ) ]
5959use crate :: upgrade:: Upgraded ;
6060
61+ #[ cfg( all( feature = "backports" , feature = "http1" ) ) ]
62+ pub mod http1;
63+ #[ cfg( all( feature = "backports" , feature = "http2" ) ) ]
64+ pub mod http2;
65+
6166cfg_feature ! {
6267 #![ any( feature = "http1" , feature = "http2" ) ]
6368
@@ -327,7 +332,7 @@ impl<E> Http<E> {
327332 self
328333 }
329334
330- /// Set a timeout for reading client request headers. If a client does not
335+ /// Set a timeout for reading client request headers. If a client does not
331336 /// transmit the entire header within this time, the connection is closed.
332337 ///
333338 /// Default is None.
@@ -809,7 +814,12 @@ where
809814 let mut conn = Some ( self ) ;
810815 futures_util:: future:: poll_fn ( move |cx| {
811816 ready ! ( conn. as_mut( ) . unwrap( ) . poll_without_shutdown( cx) ) ?;
812- Poll :: Ready ( conn. take ( ) . unwrap ( ) . try_into_parts ( ) . ok_or_else ( crate :: Error :: new_without_shutdown_not_h1) )
817+ Poll :: Ready (
818+ conn. take ( )
819+ . unwrap ( )
820+ . try_into_parts ( )
821+ . ok_or_else ( crate :: Error :: new_without_shutdown_not_h1) ,
822+ )
813823 } )
814824 }
815825
You can’t perform that action at this time.
0 commit comments