mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-28 12:10:37 +00:00
io: swap reader/writer in simplex doc test (#7176)
This commit is contained in:
parent
6d410f6c90
commit
c853991b1e
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user