Skip to content

Commit 05b13f4

Browse files
chore: Fix test warning (#155)
1 parent 30f38c8 commit 05b13f4

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

src/common/rewind.rs

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,35 +16,13 @@ pub(crate) struct Rewind<T> {
1616
}
1717

1818
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")))]
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

5028
impl<T> Read for Rewind<T>

0 commit comments

Comments
 (0)