diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-09-14 18:09:58 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-09-14 18:10:32 +0800 |
| commit | b0891c3ff11dd05c475a2b0f0e722b6b0e1aab5c (patch) | |
| tree | e7cefa66e4b635e1dd508dd676087cff4fe1d044 /src/client/executor.rs | |
| parent | 46cb6bcbe8ed6254aa06ff155828666d14ef7bed (diff) | |
chore: pub(crate) -> pub for same visibility
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() } |
