mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-04 05:17:39 +03:00
Update tests
This commit is contained in:
parent
cd2bf5fbbe
commit
a563aca46b
2 changed files with 9 additions and 10 deletions
|
@ -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"] }
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue