Skip to content

Commit b82f9e6

Browse files
committed
duplex docs
Signed-off-by: Yoshua Wuyts <[email protected]>
1 parent e341644 commit b82f9e6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818
//! use async_std::io::{self, BufReader, prelude::*};
1919
//! use duplexify::Duplex;
2020
//!
21+
//! // Create a reader and writer, and merge them into a single "duplex".
2122
//! let stdin = BufReader::new(io::stdin());
2223
//! let stdout = io::stdout();
2324
//! let mut stdio = Duplex::new(stdin, stdout);
2425
//!
26+
//! // We can now read + write from and to the duplex.
2527
//! let mut line = String::new();
2628
//! stdio.read_line(&mut line).await?;
2729
//! stdio.write_all(&line.as_bytes()).await?;

0 commit comments

Comments
 (0)