From 4f75bc1b3fd85a7b54cf6bbb6e895c2deb353299 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 14 Sep 2025 00:29:34 +0800 Subject: feat(executor): integrate into httpconnector cleanup: main --- src/client/executor.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/client/executor.rs') 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>, } impl<'a> Executor<'a> { - fn new(task: impl IntoTask, args: &'a str) -> Result { + pub(crate) fn new(task: impl IntoTask, args: String) -> Result { let task = task.into_task()?; Ok(Self { task: task, @@ -18,7 +18,7 @@ impl<'a> Executor<'a> { }) } - fn run(&mut self) -> Option<&Result> { + pub(crate) fn run(&mut self) -> Option<&Result> { self.output = Some((self.task.exec)(&self.args)); self.output.as_ref() } -- cgit v1.2.3