summaryrefslogtreecommitdiff
path: root/src/client/executor.rs
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-09-21 23:08:48 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-09-21 23:08:48 +0800
commit0cfc9d0f4acac43ce20b445ac883b7cf0ca1dc79 (patch)
tree14a465146b8858f1f46b6a4552604adfe1328b9e /src/client/executor.rs
parent8cdda8a10c563b3d6e6e306c421583f1ade3e6c1 (diff)
format
Diffstat (limited to 'src/client/executor.rs')
-rw-r--r--src/client/executor.rs19
1 files changed, 16 insertions, 3 deletions
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<Item = &'a str>) -> Result<Self, IntoTaskErr> {
- 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<String, String>> {
- self.output = Some((self.task.exec)(&self.args));
- self.output.as_ref()
+ self.output = Some(
+ (self
+ .task
+ .exec)(&self.args),
+ );
+ self.output
+ .as_ref()
}
}