From 04a972f1cae5bee1bd88b35c1e53ceaac35bde02 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Mon, 13 Nov 2023 13:21:37 -0500 Subject: [PATCH] feat!: inform of rev. ref. to fetch instead of queried rev. info --- src/main.rs | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/main.rs b/src/main.rs index 6767116..90f1816 100644 --- a/src/main.rs +++ b/src/main.rs @@ -206,23 +206,21 @@ async fn get_artifacts_for_revision(client: &Client, options: &Options, revision hash: revision, } = revision; + log::info!("fetching for revision(s): {:?}", [&revision]); + let Revision { meta: RevisionMeta { count }, mut results, - } = { - let revision = client - .get(format!( - "{treeherder_host}api/project/{project_name}/push/?revision={revision}" - )) - .send() - .await - .unwrap() - .json::() - .await - .unwrap(); - log::info!("fetching for revision(s): {:?}", [&revision]); - revision - }; + } = client + .get(format!( + "{treeherder_host}api/project/{project_name}/push/?revision={revision}" + )) + .send() + .await + .unwrap() + .json::() + .await + .unwrap(); assert!(results.len() == usize::try_from(count).unwrap()); if count > 1 {