Skip to content

Commit f0b28e6

Browse files
committed
chore: improve code comments clarity
Signed-off-by: xibeiyoumian <xibeiyoumian@outlook.com>
1 parent b1c0ca4 commit f0b28e6

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/common/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ where
7575
Stream {
7676
io,
7777
session,
78-
// The state so far is only used to detect EOF, so either Stream
79-
// or EarlyData state should both be all right.
78+
// The state so far is only used to detect EOF, so both Stream
79+
// and EarlyData states should be acceptable.
8080
eof: false,
8181
// Whether a previous flush returned pending, or a write occured without a flush.
8282
need_flush: false,
@@ -218,8 +218,7 @@ where
218218
Err(e) if e.kind() == io::ErrorKind::WouldBlock => {
219219
if !io_pending {
220220
// If `wants_read()` is satisfied, rustls will not return `WouldBlock`.
221-
// but if it does, we can try again.
222-
//
221+
// But if it does, we can try again.
223222
// If the rustls state is abnormal, it may cause a cyclic wakeup.
224223
// but tokio's cooperative budget will prevent infinite wakeup.
225224
cx.waker().wake_by_ref();

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
//! This means that if data written by `poll_write` is not actually written to data channel, it will not return `Ready`.
3232
//! Thus avoiding the call of `poll_flush`.
3333
//!
34-
//! but which does not conform to convention of `AsyncWrite` trait.
34+
//! But this does not conform to the convention of the `AsyncWrite` trait.
3535
//! This means that if you give inconsistent data in two `poll_write`, it may cause unexpected behavior.
3636
//!
3737
//! see <https://github.com/tokio-rs/tls/issues/41>

0 commit comments

Comments
 (0)