File tree Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -16,35 +16,13 @@ pub(crate) struct Rewind<T> {
16
16
}
17
17
18
18
impl < T > Rewind < T > {
19
- #[ cfg( test) ]
20
- pub ( crate ) fn new ( io : T ) -> Self {
21
- Rewind {
22
- pre : None ,
23
- inner : io,
24
- }
25
- }
26
-
27
- #[ allow( dead_code) ]
19
+ #[ cfg( all( feature = "server" , any( feature = "http1" , feature = "http2" ) ) ) ]
28
20
pub ( crate ) fn new_buffered ( io : T , buf : Bytes ) -> Self {
29
21
Rewind {
30
22
pre : Some ( buf) ,
31
23
inner : io,
32
24
}
33
25
}
34
-
35
- #[ cfg( test) ]
36
- pub ( crate ) fn rewind ( & mut self , bs : Bytes ) {
37
- debug_assert ! ( self . pre. is_none( ) ) ;
38
- self . pre = Some ( bs) ;
39
- }
40
-
41
- // pub(crate) fn into_inner(self) -> (T, Bytes) {
42
- // (self.inner, self.pre.unwrap_or_else(Bytes::new))
43
- // }
44
-
45
- // pub(crate) fn get_mut(&mut self) -> &mut T {
46
- // &mut self.inner
47
- // }
48
26
}
49
27
50
28
impl < T > Read for Rewind < T >
You can’t perform that action at this time.
0 commit comments