diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-09-17 19:24:00 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-09-17 21:28:53 +0800 |
| commit | b7bc239c47d419ea5c5b078b89ca11def6c7311b (patch) | |
| tree | baa005a248467d8347c5e3537aefae47ad6340dd /src/client/executor.rs | |
| parent | d3e755389ad61a262767f4a0cb48c0a2f85c80c6 (diff) | |
perf: more prevalent &str
Diffstat (limited to 'src/client/executor.rs')
| -rw-r--r-- | src/client/executor.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/executor.rs b/src/client/executor.rs index 35e3f75..b75040a 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> { - task: &'a Task<'a>, - args: Box<[String]>, +pub struct Executor<'a, 't> { + task: &'a Task<'t>, + args: Box<[&'a str]>, output: Option<Result<String, String>>, } -impl<'a> Executor<'a> { - pub fn new(task: &'a Task<'a>, args: impl IntoIterator<Item = String>) -> Result<Self, IntoTaskErr> { +impl<'a, 't> Executor<'a, 't> { + pub fn new(task: &'t Task<'t>, args: impl IntoIterator<Item = &'a str>) -> Result<Self, IntoTaskErr> { Ok(Self { task: task, args: args.into_iter().collect(), output: None }) } |
