From aa4f7e2afe4df51ec4dcaf7d92aef7c1dac84a8c Mon Sep 17 00:00:00 2001 From: ace Date: Mon, 2 Aug 2021 02:00:56 +0300 Subject: [PATCH] cleanup --- src/main.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main.rs b/src/main.rs index 416bb40..d488c82 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,13 +30,9 @@ impl Repo { let _res = github_get_latest_release(&self.owner, &self.repo).await; } - // fn print_result(&self) { - // println!("{}, {}", self.owner, self.repo); - // } } #[derive(Clap)] -// #[clap(version = "1.0")] struct Opts { /// Config file #[clap(long, default_value = "config.yaml")] @@ -82,16 +78,14 @@ async fn main() -> Result<(), Box> { let _items = join_parallel(items.into_iter().map(|mut item| async { item.init().await; item - })) - .await; + })).await; loop { let items: Vec<_> = config.iter().map(|x| Repo { owner: x.owner.trim().to_string(), repo: x.repo.trim().to_string() }).collect(); let _items = join_parallel(items.into_iter().map(|mut item| async { item.resolve().await; item - })) - .await; + })).await; } }