Skip to content
This repository was archived by the owner on Aug 30, 2025. It is now read-only.

Commit b168d2b

Browse files
committed
remove .clone()
1 parent 25964a8 commit b168d2b

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/main.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,9 @@ async fn main() {
209209
.await
210210
.expect("Could not establish a connection to the database")
211211
})
212-
.await
213-
.clone();
212+
.await;
214213

215-
if database::check_migrating_from_spacebar(&db)
214+
if database::check_migrating_from_spacebar(db)
216215
.await
217216
.expect("Failed to check migrating from spacebar")
218217
{
@@ -221,40 +220,40 @@ async fn main() {
221220
std::process::exit(0);
222221
} else {
223222
log::warn!(target: "symfonia::db", "Migrating from spacebar to symfonia");
224-
database::delete_spacebar_migrations(&db)
223+
database::delete_spacebar_migrations(db)
225224
.await
226225
.expect("Failed to delete spacebar migrations table");
227226
log::info!(target: "symfonia::db", "Running migrations");
228227
sqlx::migrate!("./spacebar-migrations")
229-
.run(&db)
228+
.run(db)
230229
.await
231230
.expect("Failed to run migrations");
232231
}
233232
} else {
234233
sqlx::migrate!()
235-
.run(&db)
234+
.run(db)
236235
.await
237236
.expect("Failed to run migrations");
238237
}
239238

240-
if database::check_fresh_db(&db)
239+
if database::check_fresh_db(db)
241240
.await
242241
.expect("Failed to check fresh db")
243242
{
244243
log::info!(target: "symfonia::db", "Fresh database detected. Seeding database with config data");
245-
database::seed_config(&db)
244+
database::seed_config(db)
246245
.await
247246
.expect("Failed to seed config");
248247
}
249248

250-
let symfonia_config = crate::database::entities::Config::init(&db)
249+
let symfonia_config = crate::database::entities::Config::init(db)
251250
.await
252251
.unwrap_or_default();
253252

254253
let connected_users = ConnectedUsers::default();
255254
log::debug!(target: "symfonia", "Initializing Role->User map...");
256255
connected_users
257-
.init_role_user_map(&db)
256+
.init_role_user_map(db)
258257
.await
259258
.expect("Failed to init role user map");
260259
log::trace!(target: "symfonia", "Role->User map initialized with {} entries", connected_users.role_user_map.lock().await.len());

0 commit comments

Comments
 (0)