io: swap reader/writer in simplex doc test (#7176)

This commit is contained in:
Kyle Cotton 2025-02-25 14:49:19 +00:00 committed by GitHub
parent 6d410f6c90
commit c853991b1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -197,8 +197,8 @@ impl Drop for DuplexStream {
/// ```
/// # async fn ex() -> std::io::Result<()> {
/// # use tokio::io::{AsyncReadExt, AsyncWriteExt};
/// let (writer, reader) = tokio::io::simplex(64);
/// let mut simplex_stream = writer.unsplit(reader);
/// let (reader, writer) = tokio::io::simplex(64);
/// let mut simplex_stream = reader.unsplit(writer);
/// simplex_stream.write_all(b"hello").await?;
///
/// let mut buf = [0u8; 5];