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 379c832..35e3f75 100644 --- a/src/client/executor.rs +++ b/src/client/executor.rs @@ -1,13 +1,13 @@ use remote_control_rs::tasks::{IntoTaskErr, Task}; -pub struct Executor { - task: &'static Task, +pub struct Executor<'a> { + task: &'a Task<'a>, args: Box<[String]>, output: Option<Result<String, String>>, } -impl Executor { - pub fn new(task: &'static Task, args: impl IntoIterator<Item = String>) -> Result<Self, IntoTaskErr> { +impl<'a> Executor<'a> { + pub fn new(task: &'a Task<'a>, args: impl IntoIterator<Item = String>) -> Result<Self, IntoTaskErr> { Ok(Self { task: task, args: args.into_iter().collect(), output: None }) } |
