chore(clippy): enable and fix many stricter lints (#3783)

* chore(clippy): enable and fix many stricter lints

These ensure that the codebase uses more idiomatic, performant, and
concise language constructions.

* chore: make non-Clippy compiler warnings also deny by default
This commit is contained in:
Alejandro González
2025-06-14 02:10:12 +02:00
committed by GitHub
parent 301967d204
commit f84f8c1c2b
106 changed files with 542 additions and 760 deletions

View File

@@ -1,4 +1,4 @@
use std::collections::HashMap;
use std::{collections::HashMap, fmt::Write};
use crate::{
assert_status,
@@ -490,13 +490,13 @@ impl ApiProject for ApiV2 {
featured = featured
);
if let Some(title) = title {
url.push_str(&format!("&title={title}"));
write!(&mut url, "&title={title}").unwrap();
}
if let Some(description) = description {
url.push_str(&format!("&description={description}"));
write!(&mut url, "&description={description}").unwrap();
}
if let Some(ordering) = ordering {
url.push_str(&format!("&ordering={ordering}"));
write!(&mut url, "&ordering={ordering}").unwrap();
}
let req = test::TestRequest::post()
@@ -521,11 +521,12 @@ impl ApiProject for ApiV2 {
);
for (key, value) in patch {
url.push_str(&format!(
write!(
&mut url,
"&{key}={value}",
key = key,
value = urlencoding::encode(&value)
));
)
.unwrap();
}
let req = test::TestRequest::patch()