From a4bd6da79c239c107cd727504a303fd3d2789148 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 27 Feb 2021 13:25:07 -0500 Subject: give smol its own named api too --- examples/smol.rs | 2 +- src/lib.rs | 4 +++- src/smol.rs | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 src/smol.rs diff --git a/examples/smol.rs b/examples/smol.rs index dd6fba3..5512c2d 100644 --- a/examples/smol.rs +++ b/examples/smol.rs @@ -35,7 +35,7 @@ impl Drop for RawGuard { } async fn run( - child: &pty_process::async_std::Child, + child: &pty_process::smol::Child, ) -> std::result::Result<(), Box> { let _raw = RawGuard::new(); diff --git a/src/lib.rs b/src/lib.rs index f16dcc9..42c39f4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -7,7 +7,9 @@ pub use pty::{Pty, Size}; pub mod std; -#[cfg(any(feature = "backend-async-std", feature = "backend-smol"))] +#[cfg(feature = "backend-async-std")] pub mod async_std; +#[cfg(feature = "backend-smol")] +pub mod smol; #[cfg(feature = "backend-tokio")] pub mod tokio; diff --git a/src/smol.rs b/src/smol.rs new file mode 100644 index 0000000..e91a18d --- /dev/null +++ b/src/smol.rs @@ -0,0 +1,2 @@ +pub type Child = + crate::command::Child; -- cgit v1.2.3-54-g00ecf