From 5b91709edf0f288da0b712ed5c60bf105a06d0c9 Mon Sep 17 00:00:00 2001 From: xibeiyoumian Date: Tue, 23 Dec 2025 20:24:13 +0800 Subject: [PATCH] chore: fix some minor typos in the comments (#7785) Signed-off-by: xibeiyoumian --- tokio-stream/src/stream_close.rs | 2 +- tokio/src/fs/read_uring.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tokio-stream/src/stream_close.rs b/tokio-stream/src/stream_close.rs index f9b2f1ada..a820c30d7 100644 --- a/tokio-stream/src/stream_close.rs +++ b/tokio-stream/src/stream_close.rs @@ -83,7 +83,7 @@ where #[inline] fn size_hint(&self) -> (usize, Option) { 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 { diff --git a/tokio/src/fs/read_uring.rs b/tokio/src/fs/read_uring.rs index 63eacd795..5b38c2122 100644 --- a/tokio/src/fs/read_uring.rs +++ b/tokio/src/fs/read_uring.rs @@ -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(