chore: fix some minor typos in the comments (#7785)

Signed-off-by: xibeiyoumian <xibeiyoumian@outlook.com>
This commit is contained in:
xibeiyoumian
2025-12-23 20:24:13 +08:00
committed by GitHub
parent 08f40652aa
commit 5b91709edf
2 changed files with 4 additions and 4 deletions

View File

@@ -83,7 +83,7 @@ where
#[inline]
fn size_hint(&self) -> (usize, Option<usize>) {
if let Some(inner) = &self.inner {
// We always return +1 because when there's stream there's atleast one more item.
// We always return +1 because when there's a stream there's at least one more item.
let (l, u) = inner.size_hint();
(l.saturating_add(1), u.and_then(|u| u.checked_add(1)))
} else {

View File

@@ -88,7 +88,7 @@ async fn small_probe_read(
let read_len = PROBE_SIZE_U32;
let mut temp_arr = [0; PROBE_SIZE];
// we don't call this function if buffer's length < PROBE_SIZE
// we don't call this function if the buffer's length < PROBE_SIZE
let back_bytes_len = buf.len() - PROBE_SIZE;
temp_arr.copy_from_slice(&buf[back_bytes_len..]);
@@ -98,7 +98,7 @@ async fn small_probe_read(
buf.truncate(back_bytes_len);
let (r_fd, mut r_buf, is_eof) = op_read(fd, buf, offset, read_len).await?;
// If `size_read` returns zero due to reasons such as buffer's exact fit,
// If `size_read` returns zero due to reasons such as the buffer's exact fit,
// then this `try_reserve` does not perform allocation.
r_buf.try_reserve(PROBE_SIZE)?;
r_buf.splice(back_bytes_len..back_bytes_len, temp_arr);
@@ -106,7 +106,7 @@ async fn small_probe_read(
Ok((r_fd, r_buf, is_eof))
}
// Takes a amount of length to read and returns a singluar read in the buffer
// Takes a length to read and returns a single read in the buffer
//
// Returns the file descriptor, buffer and EOF reached or not
async fn op_read(