From f31f5b49dabdb8df8fa05f59876c7d0b9934324f Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Sat, 24 May 2025 14:53:16 -0500 Subject: [PATCH] Move the URL and HTTP Client out of match block I'm going to need these in several of the arms. --- src/main.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index fad04ab..58aad99 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,14 +9,14 @@ use reqwest::header::{ACCEPT, USER_AGENT}; async fn main() -> Result<(), Error> { let args = Args::parse(); + let request_url = format!( + "http://localhost:3000/api/v1/repos/{owner}/{repo}/releases", + owner = "robert", + repo = "rcalc", + ); + let client = reqwest::Client::new(); match args.command { gt_tools::cli::Commands::ListReleases => { - let request_url = format!( - "http:/localhost:3000/api/v1/repos/{owner}/{repo}/releases", - owner = "robert", - repo = "rcalc", - ); - let client = reqwest::Client::new(); let response = client .get(request_url) .header(USER_AGENT, "gt-tools-test-agent")