diff --git a/distant-core/src/client/process.rs b/distant-core/src/client/process.rs index e63ade5..42f0637 100644 --- a/distant-core/src/client/process.rs +++ b/distant-core/src/client/process.rs @@ -19,6 +19,8 @@ use tokio::{ task::{JoinError, JoinHandle}, }; +type StatusResult = Result<(bool, Option), RemoteProcessError>; + #[derive(Debug, Display, Error, From)] pub enum RemoteProcessError { /// When attempting to relay stdout/stderr over channels, but the channels fail @@ -66,7 +68,7 @@ pub struct RemoteProcess { wait_task: JoinHandle<()>, /// Handles the success and exit code for a completed process - status: Arc), RemoteProcessError>>>>, + status: Arc>>, } impl RemoteProcess { @@ -213,7 +215,7 @@ impl RemoteProcess { .write() .await .take() - .unwrap_or_else(|| Err(RemoteProcessError::UnexpectedEof)) + .unwrap_or(Err(RemoteProcessError::UnexpectedEof)) } /// Aborts the process by forcing its response task to shutdown, which means that a call