Update tests

This commit is contained in:
Nikolay Kim 2022-01-12 22:22:45 +06:00
parent cd2bf5fbbe
commit a563aca46b
2 changed files with 9 additions and 10 deletions

View file

@ -26,6 +26,7 @@ log = "0.4"
pin-project-lite = "0.2"
[dev-dependencies]
ntex = "0.5.0"
rand = "0.8"
env_logger = "0.9"
ntex = { version = "0.5", features = ["tokio"] }

View file

@ -355,16 +355,14 @@ mod tests {
self.inner.get_read_buf()
}
fn release_read_buf(
&self,
io: &IoRef,
buf: BytesMut,
dst: &mut Option<BytesMut>,
new_bytes: usize,
) -> io::Result<usize> {
let result = self.inner.release_read_buf(io, buf, dst, new_bytes)?;
fn release_read_buf(&self, buf: BytesMut) {
self.inner.release_read_buf(buf)
}
fn process_read_buf(&self, io: &IoRef, n: usize) -> io::Result<(usize, usize)> {
let result = self.inner.process_read_buf(io, n)?;
self.read_order.borrow_mut().push(self.idx);
self.in_bytes.set(self.in_bytes.get() + result);
self.in_bytes.set(self.in_bytes.get() + result.1);
Ok(result)
}