From 445822efad6682edbe0b1e27448b997fae9564c5 Mon Sep 17 00:00:00 2001 From: Leah Amelia Chen Date: Sun, 9 Jul 2023 18:38:31 -0600 Subject: Refactors + add pin board module (#32) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor according to the rules of the cone school of rustâ„¢ * Add pin board module * cargo fmt * More cleanups + appease clippy --- src/api/guzzle.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/api') diff --git a/src/api/guzzle.rs b/src/api/guzzle.rs index e94ebb6..0321127 100644 --- a/src/api/guzzle.rs +++ b/src/api/guzzle.rs @@ -9,10 +9,10 @@ struct GuzzleResponse { const GUZZLE: &str = "https://api.mydadleft.me"; pub async fn get_random_teawie() -> String { - let endpoint = "/get_random_teawie"; - let resp = reqwest::get(GUZZLE.to_owned() + endpoint).await.unwrap(); // why did i have to own - // this constant? i have - // no idea! + let endpoint = "get_random_teawie"; + let resp = reqwest::get(format!("{GUZZLE}/{endpoint}")).await.unwrap(); // why did i have to own + // this constant? i have + // no idea! let err_msg = "couldn't get a teawie"; match resp.status() { -- cgit v1.2.3