From 0cfc9d0f4acac43ce20b445ac883b7cf0ca1dc79 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 21 Sep 2025 23:08:48 +0800 Subject: format --- src/client/executor.rs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src/client/executor.rs') diff --git a/src/client/executor.rs b/src/client/executor.rs index 26ac0ba..8fef869 100644 --- a/src/client/executor.rs +++ b/src/client/executor.rs @@ -8,11 +8,24 @@ pub struct Executor<'a, 't> { 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 }) + 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() + self.output = Some( + (self + .task + .exec)(&self.args), + ); + self.output + .as_ref() } } -- cgit v1.2.3