diff --git a/src/common/rewind.rs b/src/common/rewind.rs index 87e0f64..e2fc5bf 100644 --- a/src/common/rewind.rs +++ b/src/common/rewind.rs @@ -16,35 +16,13 @@ pub(crate) struct Rewind { } impl Rewind { - #[cfg(test)] - pub(crate) fn new(io: T) -> Self { - Rewind { - pre: None, - inner: io, - } - } - - #[allow(dead_code)] + #[cfg(all(feature = "server", any(feature = "http1", feature = "http2")))] pub(crate) fn new_buffered(io: T, buf: Bytes) -> Self { Rewind { pre: Some(buf), inner: io, } } - - #[cfg(test)] - pub(crate) fn rewind(&mut self, bs: Bytes) { - debug_assert!(self.pre.is_none()); - self.pre = Some(bs); - } - - // pub(crate) fn into_inner(self) -> (T, Bytes) { - // (self.inner, self.pre.unwrap_or_else(Bytes::new)) - // } - - // pub(crate) fn get_mut(&mut self) -> &mut T { - // &mut self.inner - // } } impl Read for Rewind