diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-09-19 17:45:33 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-09-19 17:45:33 +0800 |
| commit | dfddb8995ad68f9591a1e3e7c380d944a4f3b9d2 (patch) | |
| tree | 40af806971e48ad50b4514d652b82ee6f3bf4c6f /src/client | |
| parent | d089c1611b94c6c19d2998a56d9f4d2a983f9833 (diff) | |
task: use typed enum name
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/executor.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/executor.rs b/src/client/executor.rs index b75040a..26ac0ba 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<'a, 't> { - task: &'a Task<'t>, + task: &'t Task, args: Box<[&'a str]>, output: Option<Result<String, String>>, } impl<'a, 't> Executor<'a, 't> { - pub fn new(task: &'t Task<'t>, args: impl IntoIterator<Item = &'a str>) -> Result<Self, IntoTaskErr> { + pub fn new(task: &'t Task, args: impl IntoIterator<Item = &'a str>) -> Result<Self, IntoTaskErr> { Ok(Self { task: task, args: args.into_iter().collect(), output: None }) } |
