Skip to content

Commit 5b91709

Browse files
authored
chore: fix some minor typos in the comments (#7785)
Signed-off-by: xibeiyoumian <xibeiyoumian@outlook.com>
1 parent 08f4065 commit 5b91709

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tokio-stream/src/stream_close.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ where
8383
#[inline]
8484
fn size_hint(&self) -> (usize, Option<usize>) {
8585
if let Some(inner) = &self.inner {
86-
// We always return +1 because when there's stream there's atleast one more item.
86+
// We always return +1 because when there's a stream there's at least one more item.
8787
let (l, u) = inner.size_hint();
8888
(l.saturating_add(1), u.and_then(|u| u.checked_add(1)))
8989
} else {

tokio/src/fs/read_uring.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ async fn small_probe_read(
8888
let read_len = PROBE_SIZE_U32;
8989

9090
let mut temp_arr = [0; PROBE_SIZE];
91-
// we don't call this function if buffer's length < PROBE_SIZE
91+
// we don't call this function if the buffer's length < PROBE_SIZE
9292
let back_bytes_len = buf.len() - PROBE_SIZE;
9393

9494
temp_arr.copy_from_slice(&buf[back_bytes_len..]);
@@ -98,15 +98,15 @@ async fn small_probe_read(
9898
buf.truncate(back_bytes_len);
9999

100100
let (r_fd, mut r_buf, is_eof) = op_read(fd, buf, offset, read_len).await?;
101-
// If `size_read` returns zero due to reasons such as buffer's exact fit,
101+
// If `size_read` returns zero due to reasons such as the buffer's exact fit,
102102
// then this `try_reserve` does not perform allocation.
103103
r_buf.try_reserve(PROBE_SIZE)?;
104104
r_buf.splice(back_bytes_len..back_bytes_len, temp_arr);
105105

106106
Ok((r_fd, r_buf, is_eof))
107107
}
108108

109-
// Takes a amount of length to read and returns a singluar read in the buffer
109+
// Takes a length to read and returns a single read in the buffer
110110
//
111111
// Returns the file descriptor, buffer and EOF reached or not
112112
async fn op_read(

0 commit comments

Comments
 (0)