Cargo clippy: fix the majority of errors

This commit is contained in:
Igor Katson 2022-12-08 20:20:23 +00:00
parent 871d927596
commit 6968a4e449
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
19 changed files with 69 additions and 91 deletions

View file

@ -15,12 +15,10 @@ async fn check_response(r: reqwest::Response) -> anyhow::Result<reqwest::Respons
}
let status = r.status();
let url = r.url().clone();
let body = r.text().await.with_context(|| {
format!(
"cannot read response body for request to {} ({})",
url, status,
)
})?;
let body = r
.text()
.await
.with_context(|| format!("cannot read response body for request to {url} ({status})"))?;
anyhow::bail!("{} -> {}: {}", url, status, body)
}