From 7b896c0bf4f09bde41e03576bdcdd6f924c3af8a Mon Sep 17 00:00:00 2001 From: dignifiedquire Date: Tue, 1 Dec 2020 16:02:00 +0100 Subject: [PATCH] manual reexports --- src/lib.rs | 2 +- src/os/unix/mod.rs | 5 +++++ src/os/windows/mod.rs | 5 +++++ src/process.rs | 31 +++++++++++++++++++++++++++++-- 4 files changed, 40 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 6f97bdca..dd8fb597 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -313,7 +313,7 @@ cfg_default! { cfg_unstable! { pub mod pin; - #[cfg(not(target_os = "unknown"))] + #[cfg(all(not(target_os = "unknown"), feature = "std"))] pub mod process; mod unit; diff --git a/src/os/unix/mod.rs b/src/os/unix/mod.rs index c389d95a..36a97967 100644 --- a/src/os/unix/mod.rs +++ b/src/os/unix/mod.rs @@ -8,3 +8,8 @@ cfg_default! { pub mod fs; pub mod net; } + +#[cfg(all(feature = "unstable", feature = "std"))] +#[cfg_attr(feature = "docs", doc(cfg(unstable)))] +#[doc(inline)] +pub use async_process::unix as process; diff --git a/src/os/windows/mod.rs b/src/os/windows/mod.rs index 67bf0372..11389fb7 100644 --- a/src/os/windows/mod.rs +++ b/src/os/windows/mod.rs @@ -8,3 +8,8 @@ cfg_unstable! { #[cfg(feature = "default")] pub mod fs; } + +#[cfg(all(feature = "unstable", feature = "std"))] +#[cfg_attr(feature = "docs", doc(cfg(unstable)))] +#[doc(inline)] +pub use async_process::windows as process; diff --git a/src/process.rs b/src/process.rs index 418d2bb3..09b8390e 100644 --- a/src/process.rs +++ b/src/process.rs @@ -7,7 +7,34 @@ //! //! [`std::process`]: https://doc.rust-lang.org/std/process/index.html -#[cfg(feature = "unstable")] #[cfg_attr(feature = "docs", doc(cfg(unstable)))] #[doc(inline)] -pub use async_process::*; +pub use async_process::ExitStatus; + +#[cfg_attr(feature = "docs", doc(cfg(unstable)))] +#[doc(inline)] +pub use async_process::Output; + +#[cfg_attr(feature = "docs", doc(cfg(unstable)))] +#[doc(inline)] +pub use async_process::Stdio; + +#[cfg_attr(feature = "docs", doc(cfg(unstable)))] +#[doc(inline)] +pub use async_process::Child; + +#[cfg_attr(feature = "docs", doc(cfg(unstable)))] +#[doc(inline)] +pub use async_process::ChildStderr; + +#[cfg_attr(feature = "docs", doc(cfg(unstable)))] +#[doc(inline)] +pub use async_process::ChildStdin; + +#[cfg_attr(feature = "docs", doc(cfg(unstable)))] +#[doc(inline)] +pub use async_process::ChildStdout; + +#[cfg_attr(feature = "docs", doc(cfg(unstable)))] +#[doc(inline)] +pub use async_process::Command;