aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/process.rs')
-rw-r--r--src/process.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/process.rs b/src/process.rs
index d059803..80d5ced 100644
--- a/src/process.rs
+++ b/src/process.rs
@@ -34,7 +34,9 @@ pub enum Error {
IntoRawMode { source: std::io::Error },
}
-pub fn spawn(cmd: &str, args: &[String]) -> Result<RunningProcess, Error> {
+pub type Result<T> = std::result::Result<T, Error>;
+
+pub fn spawn(cmd: &str, args: &[String]) -> Result<RunningProcess> {
RunningProcess::new(cmd, args)
}
@@ -51,7 +53,7 @@ pub struct RunningProcess {
}
impl RunningProcess {
- fn new(cmd: &str, args: &[String]) -> Result<Self, Error> {
+ fn new(cmd: &str, args: &[String]) -> Result<Self> {
let pty =
tokio_pty_process::AsyncPtyMaster::open().context(OpenPty)?;