Skip to content

Commit 1475f00

Browse files
committed
Remove if statement
1 parent 44f8f98 commit 1475f00

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

tokio/src/fs/read_uring.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,6 @@ async fn read_to_end_uring(
4444
let mut offset = 0;
4545
let start_cap = buf.capacity();
4646

47-
// if buffer has no room and no size_hint, start with a small probe_read from 0 offset
48-
if (size_hint.is_none() || size_hint == Some(0)) && buf.capacity() - buf.len() < PROBE_SIZE {
49-
let (size_read, r_fd, r_buf) = small_probe_read(fd, buf, &mut offset).await?;
50-
51-
if size_read == 0 {
52-
return Ok(r_buf);
53-
}
54-
55-
fd = r_fd;
56-
buf = r_buf;
57-
}
58-
5947
loop {
6048
if buf.len() == buf.capacity() && buf.capacity() == start_cap {
6149
// The buffer might be an exact fit. Let's read into a probe buffer

0 commit comments

Comments
 (0)