diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-09-14 00:29:34 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-09-14 00:29:34 +0800 |
| commit | 4f75bc1b3fd85a7b54cf6bbb6e895c2deb353299 (patch) | |
| tree | 64f4724c1d5e19314e2f6e93448c295279e07896 /src/client/executor.rs | |
| parent | af71458da96fdc7699bed2d04c677a352f5af5fe (diff) | |
feat(executor): integrate into httpconnector
cleanup: main
Diffstat (limited to 'src/client/executor.rs')
| -rw-r--r-- | src/client/executor.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/executor.rs b/src/client/executor.rs index df22c57..5fbba0b 100644 --- a/src/client/executor.rs +++ b/src/client/executor.rs @@ -1,15 +1,15 @@ use crate::executor::tasks::{IntoTask, IntoTaskErr, Task}; -mod tasks; +pub(crate) mod tasks; -struct Executor<'a> { +pub(crate) struct Executor<'a> { task: &'a Task, - args: Box<[&'a str]>, + args: Box<[String]>, output: Option<Result<String, String>>, } impl<'a> Executor<'a> { - fn new(task: impl IntoTask, args: &'a str) -> Result<Self, IntoTaskErr> { + pub(crate) fn new(task: impl IntoTask, args: String) -> Result<Self, IntoTaskErr> { let task = task.into_task()?; Ok(Self { task: task, @@ -18,7 +18,7 @@ impl<'a> Executor<'a> { }) } - fn run(&mut self) -> Option<&Result<String, String>> { + pub(crate) fn run(&mut self) -> Option<&Result<String, String>> { self.output = Some((self.task.exec)(&self.args)); self.output.as_ref() } |
