diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-02-27 13:25:07 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-02-27 13:25:07 -0500 |
commit | a4bd6da79c239c107cd727504a303fd3d2789148 (patch) | |
tree | 992bb65e1d80e0290a73d2e6848e6f96adea0aea | |
parent | db4a7d7d32b702736940aa0bd8d11c2ed8645b99 (diff) | |
download | pty-process-a4bd6da79c239c107cd727504a303fd3d2789148.tar.gz pty-process-a4bd6da79c239c107cd727504a303fd3d2789148.zip |
give smol its own named api too
-rw-r--r-- | examples/smol.rs | 2 | ||||
-rw-r--r-- | src/lib.rs | 4 | ||||
-rw-r--r-- | src/smol.rs | 2 |
3 files changed, 6 insertions, 2 deletions
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<dyn std::error::Error>> { let _raw = RawGuard::new(); @@ -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<async_process::Child, crate::pty::async_io::Pty>; |