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> {
1616}
1717
1818impl < 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" ) ) ) ]
2820 pub ( crate ) fn new_buffered ( io : T , buf : Bytes ) -> Self {
2921 Rewind {
3022 pre : Some ( buf) ,
3123 inner : io,
3224 }
3325 }
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- // }
4826}
4927
5028impl < T > Read for Rewind < T >
You can’t perform that action at this time.
0 commit comments