Configure and run rustfmt

This commit is contained in:
Brian Bowman
2022-07-11 04:40:28 -05:00
parent 4d05063b61
commit e41a89b26c
10 changed files with 139 additions and 102 deletions

View File

@@ -3,7 +3,12 @@ use reqwest::header::USER_AGENT;
pub(crate) async fn query(site: &str) -> String {
let client = reqwest::Client::new();
let response = client.get(site).header(USER_AGENT, "cultivation").send().await.unwrap();
let response = client
.get(site)
.header(USER_AGENT, "cultivation")
.send()
.await
.unwrap();
response.text().await.unwrap()
}
@@ -12,7 +17,12 @@ pub(crate) async fn valid_url(url: String) -> bool {
// Check if we get a 200 response
let client = reqwest::Client::new();
let response = client.get(url).header(USER_AGENT, "cultivation").send().await.unwrap();
let response = client
.get(url)
.header(USER_AGENT, "cultivation")
.send()
.await
.unwrap();
response.status().as_str() == "200"
}
}