Enable clippy::useless_format (#8758)

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

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2024-03-02 23:31:58 -05:00 committed by GitHub
parent 373e18bc88
commit 33790b81fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 70 additions and 46 deletions

View file

@ -23,7 +23,7 @@ pub struct TestDb {
impl TestDb {
pub fn sqlite(background: BackgroundExecutor) -> Self {
let url = format!("sqlite::memory:");
let url = "sqlite::memory:";
let runtime = tokio::runtime::Builder::new_current_thread()
.enable_io()
.enable_time()

View file

@ -10,10 +10,10 @@ test_both_dbs!(
async fn test_contributors(db: &Arc<Database>) {
db.create_user(
&format!("user1@example.com"),
"user1@example.com",
false,
NewUserParams {
github_login: format!("user1"),
github_login: "user1".to_string(),
github_user_id: 1,
},
)

View file

@ -494,7 +494,7 @@ async fn test_project_count(db: &Arc<Database>) {
let user1 = db
.create_user(
&format!("admin@example.com"),
"admin@example.com",
true,
NewUserParams {
github_login: "admin".into(),
@ -505,7 +505,7 @@ async fn test_project_count(db: &Arc<Database>) {
.unwrap();
let user2 = db
.create_user(
&format!("user@example.com"),
"user@example.com",
false,
NewUserParams {
github_login: "user".into(),

View file

@ -13,10 +13,10 @@ test_both_dbs!(
async fn test_get_user_flags(db: &Arc<Database>) {
let user_1 = db
.create_user(
&format!("user1@example.com"),
"user1@example.com",
false,
NewUserParams {
github_login: format!("user1"),
github_login: "user1".to_string(),
github_user_id: 1,
},
)
@ -26,10 +26,10 @@ async fn test_get_user_flags(db: &Arc<Database>) {
let user_2 = db
.create_user(
&format!("user2@example.com"),
"user2@example.com",
false,
NewUserParams {
github_login: format!("user2"),
github_login: "user2".to_string(),
github_user_id: 2,
},
)