Skip to content

Commit f61374f

Browse files
io: fix incorrect and confusing AsyncWrite documentation (#7875)
1 parent 0d6c7af commit f61374f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

tokio/src/io/async_write.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,10 @@ use std::task::{Context, Poll};
2727
/// * `Poll::Ready(Err(e))` for other errors are standard I/O errors coming from the
2828
/// underlying object.
2929
///
30-
/// This trait importantly means that the `write` method only works in the
31-
/// context of a future's task. The object may panic if used outside of a task.
32-
///
3330
/// Utilities for working with `AsyncWrite` values are provided by
34-
/// [`AsyncWriteExt`].
31+
/// [`AsyncWriteExt`]. Most users will interact with `AsyncWrite` types through
32+
/// these extension methods, which provide ergonomic async functions such as
33+
/// `write_all` and `flush`.
3534
///
3635
/// [`std::io::Write`]: std::io::Write
3736
/// [`Write::write`]: std::io::Write::write()

0 commit comments

Comments
 (0)