From 05b13f48cbd7ac4ddc05a0156b786b3efa8ba7f0 Mon Sep 17 00:00:00 2001 From: Phoenix Kahlo Date: Mon, 28 Oct 2024 06:01:58 -0700 Subject: [PATCH] chore: Fix test warning (#155) --- src/common/rewind.rs | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) 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