File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ use std::task::{Context, Poll};
7
7
#[ derive( Debug ) ]
8
8
pub ( crate ) struct Compat < T > ( pub ( crate ) T ) ;
9
9
10
- pub ( crate ) fn compat < T > ( io : T ) -> Compat < T > {
11
- Compat ( io)
12
- }
13
-
14
10
impl < T > Compat < T > {
11
+ pub ( crate ) fn new ( io : T ) -> Self {
12
+ Compat ( io)
13
+ }
14
+
15
15
fn p ( self : Pin < & mut Self > ) -> Pin < & mut T > {
16
16
// SAFETY: The simplest of projections. This is just
17
17
// a wrapper, we don't do anything that would undo the projection.
Original file line number Diff line number Diff line change @@ -3,5 +3,5 @@ mod compat;
3
3
mod rewind;
4
4
5
5
#[ cfg( all( any( feature = "client" , feature = "server" ) , feature = "http2" ) ) ]
6
- pub ( crate ) use self :: compat:: { compat , Compat } ;
6
+ pub ( crate ) use self :: compat:: Compat ;
7
7
pub ( crate ) use self :: rewind:: Rewind ;
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ where
122
122
B :: Error : Into < Box < dyn std:: error:: Error + Send + Sync > > ,
123
123
{
124
124
let ( h2_tx, mut conn) = new_builder ( config)
125
- . handshake :: < _ , SendBuf < B :: Data > > ( crate :: common :: io :: compat ( io) )
125
+ . handshake :: < _ , SendBuf < B :: Data > > ( Compat :: new ( io) )
126
126
. await
127
127
. map_err ( crate :: Error :: new_h2) ?;
128
128
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ where
133
133
if config. enable_connect_protocol {
134
134
builder. enable_connect_protocol ( ) ;
135
135
}
136
- let handshake = builder. handshake ( crate :: common:: io:: compat ( io) ) ;
136
+ let handshake = builder. handshake ( crate :: common:: io:: Compat :: new ( io) ) ;
137
137
138
138
let bdp = if config. adaptive_window {
139
139
Some ( config. initial_stream_window_size )
You can’t perform that action at this time.
0 commit comments