Skip to content

Commit c853991

Browse files
authored
io: swap reader/writer in simplex doc test (#7176)
1 parent 6d410f6 commit c853991

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tokio/src/io/util/mem.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ impl Drop for DuplexStream {
197197
/// ```
198198
/// # async fn ex() -> std::io::Result<()> {
199199
/// # use tokio::io::{AsyncReadExt, AsyncWriteExt};
200-
/// let (writer, reader) = tokio::io::simplex(64);
201-
/// let mut simplex_stream = writer.unsplit(reader);
200+
/// let (reader, writer) = tokio::io::simplex(64);
201+
/// let mut simplex_stream = reader.unsplit(writer);
202202
/// simplex_stream.write_all(b"hello").await?;
203203
///
204204
/// let mut buf = [0u8; 5];

0 commit comments

Comments
 (0)