summaryrefslogtreecommitdiff
path: root/src/api/guzzle.rs
diff options
context:
space:
mode:
authorLeah Amelia Chen <[email protected]>2023-07-09 18:38:31 -0600
committerGitHub <[email protected]>2023-07-09 20:38:31 -0400
commit445822efad6682edbe0b1e27448b997fae9564c5 (patch)
treef95ffa8dac7845e9ee42a1a686c6e627e5a08195 /src/api/guzzle.rs
parent9b65da1265b3d6f5d38382012e6abc3936b8a45f (diff)
Refactors + add pin board module (#32)
* refactor according to the rules of the cone school of rustâ„¢ * Add pin board module * cargo fmt * More cleanups + appease clippy
Diffstat (limited to 'src/api/guzzle.rs')
-rw-r--r--src/api/guzzle.rs8
1 files changed, 4 insertions, 4 deletions
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() {