Fix Command::output example

This commit is contained in:
Taiki Endo 2021-01-16 19:29:23 +09:00
parent b83f51aa7f
commit 6a0916d1d1
1 changed files with 4 additions and 1 deletions

View File

@ -828,7 +828,10 @@ impl Command {
/// # futures_lite::future::block_on(async {
/// use async_process::Command;
///
/// let child = Command::new("ls").spawn()?;
/// let output = Command::new("cat")
/// .arg("a.txt")
/// .output()
/// .await?;
/// # std::io::Result::Ok(()) });
/// ```
pub fn output(&mut self) -> impl Future<Output = io::Result<Output>> {