diff --git a/src/common/mod.rs b/src/common/mod.rs index 07e173b5..ede69d9b 100644 --- a/src/common/mod.rs +++ b/src/common/mod.rs @@ -75,8 +75,8 @@ where Stream { io, session, - // The state so far is only used to detect EOF, so either Stream - // or EarlyData state should both be all right. + // The state so far is only used to detect EOF, so both Stream + // and EarlyData states should be acceptable. eof: false, // Whether a previous flush returned pending, or a write occured without a flush. need_flush: false, @@ -218,8 +218,7 @@ where Err(e) if e.kind() == io::ErrorKind::WouldBlock => { if !io_pending { // If `wants_read()` is satisfied, rustls will not return `WouldBlock`. - // but if it does, we can try again. - // + // But if it does, we can try again. // If the rustls state is abnormal, it may cause a cyclic wakeup. // but tokio's cooperative budget will prevent infinite wakeup. cx.waker().wake_by_ref(); diff --git a/src/lib.rs b/src/lib.rs index c1d11cd9..62387a45 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -31,7 +31,7 @@ //! This means that if data written by `poll_write` is not actually written to data channel, it will not return `Ready`. //! Thus avoiding the call of `poll_flush`. //! -//! but which does not conform to convention of `AsyncWrite` trait. +//! But this does not conform to the convention of the `AsyncWrite` trait. //! This means that if you give inconsistent data in two `poll_write`, it may cause unexpected behavior. //! //! see