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};
58
58
#[ cfg( feature = "http1" ) ]
59
59
use crate :: upgrade:: Upgraded ;
60
60
61
+ #[ cfg( all( feature = "backports" , feature = "http1" ) ) ]
62
+ pub mod http1;
63
+ #[ cfg( all( feature = "backports" , feature = "http2" ) ) ]
64
+ pub mod http2;
65
+
61
66
cfg_feature ! {
62
67
#![ any( feature = "http1" , feature = "http2" ) ]
63
68
@@ -327,7 +332,7 @@ impl<E> Http<E> {
327
332
self
328
333
}
329
334
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
331
336
/// transmit the entire header within this time, the connection is closed.
332
337
///
333
338
/// Default is None.
@@ -809,7 +814,12 @@ where
809
814
let mut conn = Some ( self ) ;
810
815
futures_util:: future:: poll_fn ( move |cx| {
811
816
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
+ )
813
823
} )
814
824
}
815
825
You can’t perform that action at this time.
0 commit comments