From ffcf415cacadf3f0084b24aaab72ccbc6b72d4f8 Mon Sep 17 00:00:00 2001 From: Nutomic Date: Fri, 16 Feb 2024 14:50:06 +0100 Subject: [PATCH] Dont log db url on connection error (fixes #4453) (#4456) * Dont log db url on connection error (fixes #4453) * remove format --- crates/db_schema/src/utils.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/db_schema/src/utils.rs b/crates/db_schema/src/utils.rs index 5ec6c7523..be551a160 100644 --- a/crates/db_schema/src/utils.rs +++ b/crates/db_schema/src/utils.rs @@ -369,8 +369,7 @@ pub const MIGRATIONS: EmbeddedMigrations = embed_migrations!(); fn run_migrations(db_url: &str) -> Result<(), LemmyError> { // Needs to be a sync connection - let mut conn = - PgConnection::establish(db_url).with_context(|| format!("Error connecting to {db_url}"))?; + let mut conn = PgConnection::establish(db_url).with_context(|| "Error connecting to database")?; info!("Running Database migrations (This may take a long time)..."); conn