Change assert_eq to assert

This commit is contained in:
blank X 2020-11-16 18:34:31 +07:00
parent ecbc3a50f5
commit a849053fd3
3 changed files with 3 additions and 3 deletions

2
Cargo.lock generated
View File

@ -421,7 +421,7 @@ dependencies = [
[[package]] [[package]]
name = "nhentairs" name = "nhentairs"
version = "0.1.1" version = "0.1.3"
dependencies = [ dependencies = [
"reqwest", "reqwest",
"serde", "serde",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "nhentairs" name = "nhentairs"
version = "0.1.2" version = "0.1.3"
authors = ["blank X <theblankx@protonmail.com>"] authors = ["blank X <theblankx@protonmail.com>"]
edition = "2018" edition = "2018"

View File

@ -22,7 +22,7 @@ pub async fn get_sauce_info(client: reqwest::Client, sauce: usize) -> Result<str
let resp = client.get(&uri) let resp = client.get(&uri)
.send() .send()
.await?; .await?;
assert_eq!(resp.status().is_success(), true); assert!(resp.status().is_success());
let body = resp.text().await?; let body = resp.text().await?;
let mut body: serde_json::Value = serde_json::from_str(&body).unwrap(); let mut body: serde_json::Value = serde_json::from_str(&body).unwrap();
fix_gallery(&mut body).unwrap(); fix_gallery(&mut body).unwrap();