Enable clippy::expect_fun_call (#8768)

This PR enables the
[`clippy::expect_fun_call`](https://rust-lang.github.io/rust-clippy/master/index.html#/expect_fun_call)
rule and fixes the outstanding violations.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-03-03 10:27:37 -05:00 committed by GitHub
parent fe04f69caf
commit 5fad319cb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View file

@ -88,9 +88,9 @@ async fn fetch_github<T: DeserializeOwned>(client: &reqwest::Client, url: &str)
.header("user-agent", "zed")
.send()
.await
.expect(&format!("failed to fetch '{}'", url));
.unwrap_or_else(|_| panic!("failed to fetch '{}'", url));
response
.json()
.await
.expect(&format!("failed to deserialize github user from '{}'", url))
.unwrap_or_else(|_| panic!("failed to deserialize github user from '{}'", url))
}

View file

@ -90,7 +90,6 @@ fn run_clippy(args: ClippyArgs) -> Result<()> {
"clippy::derivable_impls",
"clippy::derive_ord_xor_partial_ord",
"clippy::eq_op",
"clippy::expect_fun_call",
"clippy::explicit_counter_loop",
"clippy::identity_op",
"clippy::implied_bounds_in_impls",