Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6e9f95e

Browse files
fixed compilation errors in doctest
1 parent cdfd6bb commit 6e9f95e

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

‎src/process/mod.rs‎

Lines changed: 10 additions & 5 deletions
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+
pubstruct 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+
pubstruct Command;
5555

5656
impl Command {
57-
fn new<S: AsRef<OsStr>>(program: S) -> Command {
57+
pubfn 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+
pubfn spawn(&mut self) -> io::Result<Child> {
6873
unimplemented!();
6974
}
7075
}

‎tests/buf_writer.rs‎

Lines changed: 0 additions & 1 deletion
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_flushes() {
5352
task::block_on(async {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /