Skip to content

Commit 50b691b

Browse files
fixed compilation errors in doctest
1 parent 1746473 commit 50b691b

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/process/mod.rs

+10-5
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use crate::future::Future;
2020
use crate::task::Poll;
2121
use std::ffi::OsStr;
2222

23-
struct Child {
23+
pub struct Child {
2424
stdin: Option<ChildStdin>,
2525
stdout: Option<ChildStdout>,
2626
stderr: Option<ChildStderr>,
@@ -51,20 +51,25 @@ struct ChildStdin;
5151
struct ChildStdout;
5252
struct ChildStderr;
5353

54-
struct Command;
54+
pub struct Command;
5555

5656
impl Command {
57-
fn new<S: AsRef<OsStr>>(program: S) -> Command {
57+
pub fn new<S: AsRef<OsStr>>(program: S) -> Command {
5858
unimplemented!();
5959
}
6060
/// ```
61+
/// # fn main() -> std::io::Result<()> { async_std::task::block_on(async {
62+
/// #
63+
/// use async_std::process::Command;
6164
/// let child = Command::new("ls").spawn();
6265
/// let future = child.expect("failed to spawn child");
6366
/// let result = future.await?;
64-
/// assert!(!result.empty());
67+
/// assert!(result.success());
6568
/// assert!(false);
69+
/// #
70+
/// # Ok(()) }) }
6671
/// ```
67-
fn spawn(&mut self) -> io::Result<Child> {
72+
pub fn spawn(&mut self) -> io::Result<Child> {
6873
unimplemented!();
6974
}
7075
}

tests/buf_writer.rs

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ fn test_buffered_writer() {
4747
})
4848
}
4949

50-
#[ignore]
5150
#[test]
5251
fn test_buffered_writer_inner_into_inner_does_not_flush() {
5352
task::block_on(async {

0 commit comments

Comments
 (0)