Merge pull request #9 from taiki-e/example

Fix Command::output example
This commit is contained in:
Taiki Endo 2021-01-19 14:28:09 +09:00 committed by GitHub
commit fc5959c6f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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>> {