From 368aee800658e9c1a9a30871c45fc6034cceda48 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Tue, 16 Sep 2025 20:48:43 +0800 Subject: refactor: use std TryFrom instead of custom IntoTask --- src/client/executor.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/client/executor.rs') diff --git a/src/client/executor.rs b/src/client/executor.rs index 32a0fdc..379c832 100644 --- a/src/client/executor.rs +++ b/src/client/executor.rs @@ -1,4 +1,4 @@ -use remote_control_rs::tasks::{IntoTask, IntoTaskErr, Task}; +use remote_control_rs::tasks::{IntoTaskErr, Task}; pub struct Executor { task: &'static Task, @@ -7,8 +7,7 @@ pub struct Executor { } impl Executor { - pub fn new(task: impl IntoTask, args: impl IntoIterator) -> Result { - let task = task.into_task()?; + pub fn new(task: &'static Task, args: impl IntoIterator) -> Result { Ok(Self { task: task, args: args.into_iter().collect(), output: None }) } -- cgit v1.2.3