Skip to content

Commit

Permalink
chore: Fix test warning (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
gretchenfrage authored Oct 28, 2024
1 parent 30f38c8 commit 05b13f4
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions src/common/rewind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,13 @@ pub(crate) struct Rewind<T> {
}

impl<T> Rewind<T> {
#[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<T> Read for Rewind<T>
Expand Down

0 comments on commit 05b13f4

Please sign in to comment.