Cargo clippy: fix the majority of errors
This commit is contained in:
parent
871d927596
commit
6968a4e449
19 changed files with 69 additions and 91 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue