From c7a2788158628d3445f0f3574a0d7adfabd0a755 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Fri, 19 Sep 2025 22:59:22 +0800 Subject: init --- src/client/executor.rs | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 src/client/executor.rs (limited to 'src/client/executor.rs') diff --git a/src/client/executor.rs b/src/client/executor.rs deleted file mode 100644 index 26ac0ba..0000000 --- a/src/client/executor.rs +++ /dev/null @@ -1,18 +0,0 @@ -use remote_control_rs::tasks::{IntoTaskErr, Task}; - -pub struct Executor<'a, 't> { - task: &'t Task, - args: Box<[&'a str]>, - output: Option>, -} - -impl<'a, 't> Executor<'a, 't> { - pub fn new(task: &'t Task, args: impl IntoIterator) -> Result { - Ok(Self { task: task, args: args.into_iter().collect(), output: None }) - } - - pub fn run(&mut self) -> Option<&Result> { - self.output = Some((self.task.exec)(&self.args)); - self.output.as_ref() - } -} -- cgit v1.2.3