summaryrefslogtreecommitdiffstats
path: root/tokio-net/src/process/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tokio-net/src/process/mod.rs')
-rw-r--r--tokio-net/src/process/mod.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/tokio-net/src/process/mod.rs b/tokio-net/src/process/mod.rs
index 140daa5d..fbe905ad 100644
--- a/tokio-net/src/process/mod.rs
+++ b/tokio-net/src/process/mod.rs
@@ -55,10 +55,11 @@
//! We can also read input line by line.
//!
//! ```no_run
+//! use tokio::io::{BufReader, AsyncBufReadExt};
+//! use tokio::process::Command;
+//!
//! use futures_util::stream::StreamExt;
-//! use std::process::{Stdio};
-//! use tokio::codec::{FramedRead, LinesCodec};
-//! use tokio_net::process::Command;
+//! use std::process::Stdio;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
@@ -77,7 +78,7 @@
//! let stdout = child.stdout().take()
//! .expect("child did not have a handle to stdout");
//!
-//! let mut reader = FramedRead::new(stdout, LinesCodec::new());
+//! let mut reader = BufReader::new(stdout).lines();
//!
//! // Ensure the child process is spawned in the runtime so it can
//! // make progress on its own while we await for any output.