diff --git a/src/lib.rs b/src/lib.rs index 32a37aa..2a3c757 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -58,7 +58,7 @@ impl TaskExecutor { /// Installs the system from the given system configuration #[tracing::instrument(level = "trace", skip(self))] pub async fn install_from_config(&self) -> AppResult<()> { - let config = self.config.clone().ok_or_else(|| AppError::MissingConfig)?; + let config = self.config.clone().ok_or(AppError::MissingConfig)?; self.create_partitions(config.partitions).await?; self.install_base(()).await?; self.install_kernels(config.kernels).await?; diff --git a/src/tasks/mod.rs b/src/tasks/mod.rs index 4751943..2c01420 100644 --- a/src/tasks/mod.rs +++ b/src/tasks/mod.rs @@ -55,16 +55,13 @@ impl TaskFiles { macro_rules! __all_tasks { ($($task:ident),+) => { { - let mut list = Vec::new(); - $( - list.push(TaskFiles { + vec![$( + TaskFiles { script: $task::get_name().into(), pre_hook: $task::get_pre_hook().into(), post_hook: $task::get_post_hook().into(), - }); - )+ - - list + }, + )+] } }; }