diff options
Diffstat (limited to 'src/client/executor.rs')
| -rw-r--r-- | src/client/executor.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/executor.rs b/src/client/executor.rs index 7f11941..8ef98b5 100644 --- a/src/client/executor.rs +++ b/src/client/executor.rs @@ -1,15 +1,15 @@ use crate::executor::tasks::{IntoTask, IntoTaskErr, Task}; -pub(crate) mod tasks; +pub mod tasks; -pub(crate) struct Executor { +pub struct Executor { task: &'static Task, args: Box<[String]>, output: Option<Result<String, String>>, } impl Executor { - pub(crate) fn new( + pub fn new( task: impl IntoTask, args: impl IntoIterator<Item = String>, ) -> Result<Self, IntoTaskErr> { @@ -21,7 +21,7 @@ impl Executor { }) } - pub(crate) fn run(&mut self) -> Option<&Result<String, String>> { + pub fn run(&mut self) -> Option<&Result<String, String>> { self.output = Some((self.task.exec)(&self.args)); self.output.as_ref() } |
